|
|
|
date: Mon, 14 Jan 2008 09:28:05 -0800 (PST),
group: microsoft.public.word.vba.beginners
back
Re: VB MessageBox Options
There is no form specified in the command
DoCmd.OpenForm "", , , , acFormAdd
As this is code for Acess, it would be better to ask your questions in one
of the Access newsgroups - probably microsoft.public.access.formscoding.
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
wrote in message
news:764c3a1b-be98-4b28-9c0f-8b19b58f6ce1@j78g2000hsd.googlegroups.com...
>I am working on a form "A" and i have created a Message box that has
> 'yes' and 'No' options.
>
> if i click on the yes button then it should open up a new form "B"
> for me,But if i click on the No option then it should let me stay in
> the same form that i have been working previsiouly.
>
>
> I have this code here.Can anyone help me as to what i am missing
> here.
>
>
> Private Sub Form_Open(Cancel As Integer)
> If IsNull(CompanyID) Or IsNull(InspectorID) Then
> MsgBox "", vbYesNo + vbCritical + vbDefaultButton2
> If Response = vbYes Then
> DoCmd.OpenForm "", , , , acFormAdd
> Else
> If Response = vbNo then
> Exit Sub
> End if
>
>
date: Tue, 15 Jan 2008 07:48:17 +1000
author: Doug Robbins - Word MVP
|
|