Dynamic Form Fields

cratediggah

New member
Local time
Today, 03:11
Joined
Feb 9, 2004
Messages
7
Hi there,

Is it possible to have fields appear based on a pull-down option?

IE: (For a bibliography DB)

If I have a pull-down menu with a list of 1-5, field inputs: Author_First_Name1, Author_Last_Name1, Author_First_Name2, Author_Last_Name2, etc. will appear based on the number you choose.

Along the same lines, is it possible to change the Field name based upon an option chosen?

IE: (For the same bibliography DB)

If you choose Journal Article rather than Book for the Source_Type, you would get the choice of "Journal Name" rather than "Book Name" , etc.

I appreciate your help, thanks!
 
Is it possible to have fields appear based on a pull-down option?
Yes, but it's probably easiest to hide/show fields based on your choice, rather than actually changing the controlsources of the fields.

Along the same lines, is it possible to change the Field name based upon an option chosen?
As above, you could design two different fields in your table to hold this info, or you could use one field. If you choose the latter, then you can just change the label attached to the field, rather than the field itself.
 
dcx693 said:
Yes, but it's probably easiest to hide/show fields based on your choice, rather than actually changing the controlsources of the fields.

As above, you could design two different fields in your table to hold this info, or you could use one field. If you choose the latter, then you can just change the label attached to the field, rather than the field itself.

Excellent! I am sort of new with Access, is there any way you can help me figure out how to hide/show fields based on my selections? Thanks!
 
OK, first have you don't any coding in VBA? If not, please check out the Access online Visual Basic help.

You'll need to know how to place code into the After Update event of your pull-down list (it's called a combo box in Access).

The code will look something like this:
Code:
Select Case Me.cboPullDown
  Case is = "First choice"
    Me.txtField1.Visible=False
  Case is = "Second choice"
    Me.txtField2.Visible=True
         [i]etc....[/i]
  Case Else
End Select
Where cboPullDown is the name of your combo box, txtFieldx is the name of a field you want to show or hide.
 

Users who are viewing this thread

Back
Top Bottom