B
Bessie Sanders
Hello,
I am having some problems with the not in list event. I
want the staff to add a new customer inturns, it will take
them to the customer form. This is what I have so far:
Private sub customerID_notinlist(newdata as string,
response as integer)
dim db as dao.database
dim rs as dao.recordset
dim strmsg as string
if NewData = " " then exit sub
strmsg = " ' " & NewData & " is not in the list. " &vbcr
&vbCr
strmsg = strmsg & "do you want to add this customer?"
if msgbox(strmsg, vbQuestion + vbYesNo) = vbYes then
DoCmd.OpenForm"customers",,,,acAdd, adCialog, NewData
else
response = acDataErrcontinue
strmsg = strmsg & "Customer is added."
response = vbOKOn
response = acDataErrAdded
rs.close
re.update
end if
exit sub
end sub
When I try to add the new customer name this what pops
up "The text you entered, isn't an item in the
list." "Select an item from the list, or enter text that
matches one of the listed items. OK"
I been working on this for a couple of days and the same
thing keep poping up. Also, I have 6,000 record in this
database could this had affect of why adding new names
stop working?
Thanks in advance
Bessie
I am having some problems with the not in list event. I
want the staff to add a new customer inturns, it will take
them to the customer form. This is what I have so far:
Private sub customerID_notinlist(newdata as string,
response as integer)
dim db as dao.database
dim rs as dao.recordset
dim strmsg as string
if NewData = " " then exit sub
strmsg = " ' " & NewData & " is not in the list. " &vbcr
&vbCr
strmsg = strmsg & "do you want to add this customer?"
if msgbox(strmsg, vbQuestion + vbYesNo) = vbYes then
DoCmd.OpenForm"customers",,,,acAdd, adCialog, NewData
else
response = acDataErrcontinue
strmsg = strmsg & "Customer is added."
response = vbOKOn
response = acDataErrAdded
rs.close
re.update
end if
exit sub
end sub
When I try to add the new customer name this what pops
up "The text you entered, isn't an item in the
list." "Select an item from the list, or enter text that
matches one of the listed items. OK"
I been working on this for a couple of days and the same
thing keep poping up. Also, I have 6,000 record in this
database could this had affect of why adding new names
stop working?
Thanks in advance
Bessie