change yes/no via button in form

alexmb1

Registered User.
Local time
Today, 05:13
Joined
Jun 15, 2009
Messages
41
I have a form that lists data about current and incoming employees. for the incoming employees that need to be assigned housing i have a combo box that lists all available houses for the year. these houses are those that belong to departing employees and are up for reassignment. after the residence is selected it moved to the 'proposed assignment' box. then you click assign and it becomes the "assigned" residence.

i would like to create a way either via code or macro that when you click the assign button it changes the 'reassigned' column in the "available housing' queary (from "no" to "yes") for the address that is being assigned. this way the house would automatically be removed from the query since only houses with "no" in the 're-assigned' column can appear. can anyone help me?
 
Set up an update query to change the field to -1 and for the criteria use the combo.
 
how do i set a criteria to look at my combo box? i have never done this before and need some input from you. thanks

Alex
 
how do i set a criteria to look at my combo box? i have never done this before and need some input from you. thanks

Alex
The criteria line (in the Query By Example grid):

=[Forms]![YourFormNameHere]![YourComboBoxNameHere]

(leave the [Forms]! part just like it is and replace the other stuff with your actual form and combo box name.)
 

Users who are viewing this thread

Back
Top Bottom