If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
not in list open a form
Your right I didn't see that word wrap, but the DoCmd.OpenForm line is
still red and erroring..I have this code. Private Sub Service_NotInList(NewData As String, Response As Integer) If MsgBox("The Agency Entered is not in database, would you like to add it?", _ vbYesNo) = vbYes Then DoCmd.OpenForm "frmRequestingAgency", , , , acFormAdd, acDialog, NewData Response = acDataErrAdded Else Me!Service = Me!Service.OldValue DoCmd.Close End If End Sub |
#12
|
|||
|
|||
not in list open a form
"winty03" wrote in message
ups.com Your right I didn't see that word wrap, but the DoCmd.OpenForm line is still red and erroring..I have this code. DoCmd.OpenForm "frmRequestingAgency", , , , acFormAdd, acDialog, NewData Again, the only error I can see in it is that it should all be on one line, with no line breaks. Is it broken onto multiple lines in your original code? Any statement that is going to be broken onto multiple lines needs to use a line-continuation character at the end of each broken line. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#13
|
|||
|
|||
not in list open a form
got it, ya damn word wrap was getting me..sorry about that! thanks for
the help! |
#14
|
|||
|
|||
not in list open a form
Is the code suppose to close the entire form? I thought when you
clicked no that it would bring you back to your form where you entered the data and beable to correct say a mistype. Now when I click close it sends back out of the form I was enter data into. |
#15
|
|||
|
|||
not in list open a form
"winty03" wrote in message
ps.com Is the code suppose to close the entire form? I thought when you clicked no that it would bring you back to your form where you entered the data and beable to correct say a mistype. Now when I click close it sends back out of the form I was enter data into. That's what that code says to do: Else Me!Service = Me!Service.OldValue DoCmd.Close That doesn't make sense to me, but that's what you had written. If you don't want to close the form, remove the line ... DoCmd.Close .... from the Else clause. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#16
|
|||
|
|||
not in list open a form
perfect thanks! the code I was using before this was giving me the
form even if i clicked no to adding it. working perfect thanks! dirk |
|
Thread Tools | |
Display Modes | |
|
|