Eliminate TextBox

mapat

Registered User.
Local time
Yesterday, 22:24
Joined
Feb 2, 2007
Messages
176
hello,
another problem that I have is as follows:

I have 2 txtBoxes and a button (txtA, txtB, btn). When opening the form I fill in txtA and txtB. Now when clicking on the button "btn" (OnClick event), the program is supposed to compare the values in the 2 txtboxes. If they are equal (txtA=txtB), then I have to do something which is not relevant to my question. In the code I type:

if (Me.txtA.Value = Me.txtB.Value) then
' DO WHATEVER
End if

and it does not even go through the conditional statement if to do whatever I want the program to do inside the if. I would really appreciate anyone's help.

Thank you very much
PS: By the way, thank you boblarson and rainman89 for the past question, both solutions worked, I used boblarson's but I have to click on the form when it's opened in order for the changes in the table to take effect.
 
Last edited:
Use CurrentDb.Execute to execute the query instead
 
go to tools>options edit/find. under the confirm part turn off your record changes and action queries.

note this is risky as sometimes action queries will occur w/o asking for confirmation

EDIT:::: Try boBs method first!!!
 

Users who are viewing this thread

Back
Top Bottom