Locating Record - Updating and Adding Data

jcwillette

Registered User.
Local time
Today, 13:36
Joined
Jan 19, 2009
Messages
23
I am tryin gto build a database for tracking vehicles that are parking in a garage. Our employees are not allowed to park in this guest garage so we are tracking vehicles that are entering the garage. Here is my Input Form Fields;

License Text (This is set to No Duplicates and is the Key Field)
State Text
Make Text
Model Text
Type Text
Color Text
Code 4 Yes/No Box


These are my Subform Fields;

License Text
Informed Yes/No Box
Date Date/Time
Time Date/Time
Reason Text
Checkpoint Text
Level Text
Section Text
Comments Text


I want the License field in the Input Form to locate the record in the License Table and display all the information in the Input Fields in the Input Form and Date Subform. If it does not find the license, then I want the input form and subform to be cleared and input all fields for that new license record.:D

At this moment I have it to where it will get the data for the record and display the subform data but doesn't fill in the datat for the main form only the subform.:(

The forms seem to be working fine by jumping from the Input Form to the Subform when entering data. When I get to the Comments section (Last input field on the subform) and do a final Enter - I get a runtime error 2465 and it doesn't go back to the first field in th Input Form at the License Field.:mad:

Any help with this is very much appreciated. Thanks;)
 
I would suggest one change to the structure of the following table:

VehicleID (This is set to No Duplicates and is the Key Field)
License Text (This is set to No Duplicates)
State Text
Make Text
Model Text
Type Text
Color Text
Code 4 Yes/No Box

Now use the field "VehicleID" to identify the vehicle in your sub form.

Take for example a registration which contains "8" but you inadvertently key in "B" you don't notice for several days, you build your database, you add records to your subform, then you notice a mistake, you go in and change it from a "B" to an "8" now your database won't work because the information in your vehicle database does not match the information in your subform.
 

Users who are viewing this thread

Back
Top Bottom