Select Case Statement (1 Viewer)

G

gilgamesh

Guest
I have been successful at hiding (.visible) specific textboxes on my form bases on entries in other textboxes, only while viewing records already in my database.

I am trying to hide, or only make certain textboxes available, based on input to other boxes during data entry. I believe that Select Case is better that an if/then statment but I can't seem to get it entered in the correct procedure. I am using VBA in an Office 97 Access Database.
please help!!
 

TonTon

New member
Local time
Today, 08:54
Joined
Nov 2, 1999
Messages
9
Insert your Select Case statement into the AfterUpdate event of the text/combo box (etc), which decides availability of other boxes.

eg If you have a field Married(Yes/No) and you only want your MaidenName text box to appear if the user selects YES for Married, then insert the code into the AfterUpdate event for Married.

Also, depending on your interface, you may need to run this code from your On_Current event aswell. ie when control passes to a record - is the Married field Yes/No and therefore display/don't display MaidenName.

Hope this helps
Tony
 

Users who are viewing this thread

Top Bottom