outomatically fill in fields based on the selection in the switchb

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I set up a field in a data base to automatically be filled in based
upon the users selection in the switch board.Example if the user selects
project 1 in the switchboard when he goes to the form the project name field
will automatically indicate project1
 
In such situation I would make several copies of the form (one for each
project), like "frmForProject1", "frmForProject2", etc.
On form "frmForProject1" make the default value for the field "project1", on
form "frmForProject1" make the default value for the field "project2" and so
on.
In this case you can even make the field locked or invisible, so that users
could not change the value.
In the switchboard assign buttons to open different forms accordingly.
Mike
 
Waynef said:
How can I set up a field in a data base to automatically be filled in based
upon the users selection in the switch board.Example if the user selects
project 1 in the switchboard when he goes to the form the project name field
will automatically indicate project1


Here's one way. On the Switchboard, I set up a button called "Project
1" defined thus:

Text: Project 1
Command: Run Macro
Macro: M_SetProj1

and Macro [M_SetProj] contains the following actions:

OpenForm F_SetValue
SetValue [Forms]![F_SetValue]![Value], "Project 1"

and text box [Value] on Form [F_SetValue] is unbound. You can set an
event on that text box to do something interesting, but at this point
the value is available for you to use.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top