English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have an access form and I wanted to do the following:
I want for the user to have 3 options on the form.
If the vendor already exists in the vendor table that is the subform, the user will continue normally inputing the data.
If the vendor doesn't exist, the message will pop up with two options, vbYesNo. If the user choses yes, then he will continue inputing the data as normal (Now, I got it to work the subform will update the vendor tbl). However if the user choses No, then I want to undo his entry and take the cursor back to the previous field so they can start inputing the right data. (this part doesn't work for me, the code doesn't undo when the user click the No option)
your help is appreciated.

2007-02-26 10:34:44 · 1 answers · asked by Anonymous in Computers & Internet Programming & Design

I want for the user to have 3 options on the form.
If the vendor already exists in the vendor table that is the subform, the user will continue normally inputing the data.
If the vendor doesn't exist, the message will pop up with two options, vbYesNo. If the user choses yes, then he will continue inputing the data as normal (Now, I got it to work the subform will update the vendor tbl). However if the user choses No, then I want to undo his entry and take the cursor back to the previous field so they can start inputing the right data. I can't make it work when the vendor exist, The msgbox is pouping up as well and it shouldn't. What ami doing wrong?
your help is appreciated.

2007-02-26 10:38:03 · update #1

1 answers

The popup should be in a conditional statement, like:

IF vendor NOT IN vendorlist THEN
display pop up
END IF

The NO button code should resemble this:

btnNO_Click
' clear the contents
textboxVendor.clear
or textboxVendor.text = ""

'put the cursor in this box
textboxVendor.setfocus

hope that helps

2007-02-27 08:52:48 · answer #1 · answered by rod 6 · 0 0

fedest.com, questions and answers