Yes it is possible, and with way too many ways in which to describe in just a single post. So lets break your question down into simple strait forward tasks.
First, you have badge ID's. How do you display them? ComboBox, Grid of some sorts, or is user supposed to know these badge ID's from memory?
Second, you have employees. How do you access them? Display Them?
Need help with code? Start with data form wizard.
Good Luck
vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
Okay, user types in a badge ID that they have in hand, and then hit a search button or a search is done and the data grid is populated with a bunch of information.
Now depending upon if the user is handing the badge to the employee for the employee to use or taking it back you have to either a) make an entry into table1 to note that the badge is in use or b) make an entry into table2 to note that the badge is no longer in use.
So you are going to need an if statement that test to see if information is going into table1 or table2.
Now, if I have understood you correctly so far... If the information is going into table1. Then you will need to insert that information via an insert statement into table1 or if the information is going into table2, then you will also need an insert statement but the values of this insert statement will be coming from table1. After that, then you will need to delete the information from table1.
Okay, so if I have this right then...
If condition means insert into table1 then
INSERT INTO Table1(Field1, Field2, Field3,...) VALUES (Value1, Value2, Value3,...)
Else
INSERT INTO Table2(Field1, Field2, Field3,...) VALUES (Value1 from table1, Value2 from table1, Value3 from table1,...) WHERE Table1.Field = unique criteria
'execute query
DELETE FROM Table1 WHERE Field = unique criteria '(same unique criteria as the insert statement)
End if
I think I have that right...
Good Luck
vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296