.visible attribute per record? (not entire form)

EPD Hater

Registered User.
Local time
Yesterday, 23:04
Joined
Mar 30, 2003
Messages
50
I would like to use a .visible (or the workings of it) on a per-record basis in a form dependant on the value of a combo-box. If "Check" is chosen from the combo-box, I want to display a few things, and if "ACH" is chosen from the combo-box, I want to display other things. Can this be done? I know it must go in the after_update event for the combo-box.
 
Just an idea...

Can you use query as a recordsource for your form and use the combobox as criteria for the query?
 
Not sure what you're asking, but if I understand corretly, I would prefer to have both types of records displayed at the same time. Take a look at the attachment.

Thanks for your help
 

Attachments

You field in your history table should be a lookup field to your indicator table.

Take a look at it, probably doesn't look excactly how you want it to but I think it does what you need it to do. There might be a better way but that's all that comes to my mind for now.

Post back with any questions you have or if you need more help, I'm more than willing to help you out as much as I can!
:D

You may want to do a search on naming conventions. I haven't taken a look at the table structure yet so I don't know if you have all the relationships (except fot the one I added for the lookup field).
 

Attachments

Well, I thought about it, and this may be the better idea as it's easier to handle...just one textbox to handle this "additional information"....but my problem is I created the text box on my original form to mimic your text box that grabs "ShowField" from the query, but it's giving me a #Name? error in the textbox upon viewing.
 
Ok, nevermind...I had to change the control source on the form itself to the name of the query. Thanks for your help!
 
EPD Hater ,

Glad that I could help.

There may be a way to code the .visible of certainn fields for each record dependant on what is stored in a field on each record for continuous forms but I don't know it. (Although I somehow doubt that you can for forms. I know you can for reports, though!)

You could use your original code if you made your form a Columnar form instead of a Tabular (continuous) form, i.e. show one record at a time.
:D

BTW, what does EPD stand for?
:confused:
 
By the way, I redesigned the thing, I'm using a "single form" layout instead of continous, so I am now using the .visible attribute.

Are you sure you want to know what EPD stands for? "Elderly People Driving", but that was years ago when I made that up. I had made a speech in speech class in college to force mandatory driving tests for older people (which may be in effect now in some states). I do not intend to offend. :o
 
Just a suggestion.

Place this in the after update of the comboBox and OnCurrent of the form.

If me.ComboBoxName = "Check" or "ACH" then
Me.YourFieldName.Visible = False ' if you dont want it be seen
else
Me.YourFieldNane.Visible = True
End If
 

Users who are viewing this thread

Back
Top Bottom