Not in List Need to show Form

marlind

Registered User.
Local time
Yesterday, 22:23
Joined
Oct 9, 2007
Messages
19
I select from names in combo184. If the name is not in the list I found this code that works
Dim strTmp As String

'Get confirmation that this is not just a spelling error.
strTmp = "Add '" & NewData & "' as a new Requester?"
If MsgBox(strTmp, vbYesNo + vbDefaultButton2 + vbQuestion, "Not in list") = vbYes Then

'Append the NewData as a record in the Categories table.
strTmp = "INSERT INTO tblrequesterdetails (Requester ) " & _
"SELECT """ & NewData & """ AS Requester;"
DBEngine(0)(0).Execute strTmp, dbFailOnError

'Notify Access about the new record, so it requeries the combo.
Response = acDataErrAdded
'frmallrequester.SetFocus

End If
I want to open a form that contains more data like city state, etc. When I did It kept on saying it was missing the data even thou this had already added then I got duplicate error messages. Maybe there is a way to do it all on the form. Here is what i want do happen when not in list is activate
open form frmrequestersadd as a new record with requester displayed as the user had typed it out.

Thanks for the help.
 
Sorry, I don't understand what you are asking for. Why are you opening a form that contains more data? What is the User suppose to do with this form? Is it just for information?
 
Gina, I think the OP wants to enter extra fields with the new value. For example, if a new suburb is being added, he wants to capture State and zip code for future reference.

OP, have the event open a form in dialog mode and have the user fill in the additional fields. Research this and if you want further help, post in the Forms or Modules section.
 
Cronk,

You could be right (and probably are) but it was the last part that I didn't understand. Well, we'll know one way or the other, soon enough...
 
They will add their address type of business, etc. I did but a subform and made it visible for my solution but would like to know the correct way to do it.
 
IMO, the "correct" way is in #3
 

Users who are viewing this thread

Back
Top Bottom