A
AkAlan via AccessMonster.com
I have a pop up form with an unbound Text Box called txtCurrentMeterReading.
When I open the form I push into txtCurrentMeterReading an integer value
which I grab from the current form but some how there are quotes around the
value which isn't seen on the form, only when I try and run VBA code and
compare the Text Box value to another Text Box. So lets say I push 100 to the
txtCurrentMeterReading Box and the user inputs 99 into another Text Box. When
the code runs it reads If 99 < "100" Then ....
The problem is that because of the quotes, the comparison never sees that 99
is in fact less than 100 and I never get into my Then statement. I don't
understand why the quotes were added to the field in the first place. Here is
the code I used to push the value
DoCmd.OpenForm "frmMeterHourUpdate"
Forms!frmMeterHourUpdate.txtCurMeterHours = Me.MeterReading
Any help is appreciated. Thanks.
When I open the form I push into txtCurrentMeterReading an integer value
which I grab from the current form but some how there are quotes around the
value which isn't seen on the form, only when I try and run VBA code and
compare the Text Box value to another Text Box. So lets say I push 100 to the
txtCurrentMeterReading Box and the user inputs 99 into another Text Box. When
the code runs it reads If 99 < "100" Then ....
The problem is that because of the quotes, the comparison never sees that 99
is in fact less than 100 and I never get into my Then statement. I don't
understand why the quotes were added to the field in the first place. Here is
the code I used to push the value
DoCmd.OpenForm "frmMeterHourUpdate"
Forms!frmMeterHourUpdate.txtCurMeterHours = Me.MeterReading
Any help is appreciated. Thanks.