The place my sister works for needs to track companies to which their people are "cleared" to go and how long they are "cleared" for that location. I've developed a simple database that allows her to either input or view all "clearances" for each of their people. However, if a new location comes along, she needs to be able to add it.
I have 3 main tables: Personnel, Location, Clearance
Personnel contains 2 fields: NameID, LastName (that's all she wants - hopefully, there are no duplicate last names! Can always add in 1st name later very easily, though)
Location contains 2 fields: LocID, Location
Clearance contains fields: ClearID, DateGen, DateExp, NameID, LocID
The main form (based on a query from the 3 tables) shows the name and a subform showing all clearances for that person. Example:
Doe
ClearID DateGen DateExp Location
1 1/25/2002 2/25/2002 Company X (SomeCity, State)
2 1/25/2002 2/25/2002 Company Y (AnyCity, State)
and so forth. Location is a drop-down box where she can either click on the arrow and scroll to find her location or start typing and hope she gets a match. However, if there is no match and she wants to add a new location what is the best way to do that? Here's what I was thinking about:
1) Set it up so that she can select or enter a new one. But I don't know how to do that! Keep in mind, I don't write code - I just use wizards and properties!
2) Set it up so that she has to click a button to open another form (call it Location Form) and enter it that way.
BTW, I did it via option 2 but the locations were not showing up unless I first close the Main Form, even though they were present in the location table while the main form was still open.
Any suggestions?
Thanks!
I have 3 main tables: Personnel, Location, Clearance
Personnel contains 2 fields: NameID, LastName (that's all she wants - hopefully, there are no duplicate last names! Can always add in 1st name later very easily, though)
Location contains 2 fields: LocID, Location
Clearance contains fields: ClearID, DateGen, DateExp, NameID, LocID
The main form (based on a query from the 3 tables) shows the name and a subform showing all clearances for that person. Example:
Doe
ClearID DateGen DateExp Location
1 1/25/2002 2/25/2002 Company X (SomeCity, State)
2 1/25/2002 2/25/2002 Company Y (AnyCity, State)
and so forth. Location is a drop-down box where she can either click on the arrow and scroll to find her location or start typing and hope she gets a match. However, if there is no match and she wants to add a new location what is the best way to do that? Here's what I was thinking about:
1) Set it up so that she can select or enter a new one. But I don't know how to do that! Keep in mind, I don't write code - I just use wizards and properties!
2) Set it up so that she has to click a button to open another form (call it Location Form) and enter it that way.
BTW, I did it via option 2 but the locations were not showing up unless I first close the Main Form, even though they were present in the location table while the main form was still open.
Any suggestions?
Thanks!