Discussion Locked

Access 97 problem with form and records

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello, I am currently working on a project but I recently encountered a problem which I cant find the solution, so here it is:
I have my form which contains all the records and I want to make a little checkup before it shows the record details... But when I put my code which is similar to this exemple:
If me.txtTest.value <> "" then
me.cboTest.Enabled = false
End if

It simply dont work... I'm adding this code to the form_open thing but it keeps the result, so if my 1st record was true well ALL other records will be which is something I dont want at all.

Thanks in advance.

2 replies

by dryflies

How about you just tell us what you want to do. If you are trying to validate data, I would do that either in a query prior to loading the form or set the validation properties for your form.
if you want to have a calculated field in your form, then I would go to the field on the form where the me.txtTest.value is displayed and have it set me.cboTest.Enabled during the drawing or redrawing of the field.

please rate my answer

by sgt_shultz

you are not resetting your test variable temp spot or something. you are looping before you think or something. you need to learn to set a watch on a variable(s) and step thru your code in the access vba editor. if you got this far you can figure out how to do that and it is very powerful for taking next step in learning to code imho. check out access vba Help. if you do not have working access vba help (this is not the regular access Help files, it is special help files you get from Help within vba editor and may or may not be installed), post back if you need help isntalling it. or research that yourself fairly simple at support.microsoft.com

This discussion is closed to new replies.