I certainly understand the importance of referential integrity (RI); however, RI means nothing if data can't be entered. Thus my problem.
I want to create a database (for my own personal reasons - not required by employer) to help me keep track of licensed software deployed. For example, if we (company) have a volume license agreement for 500 users, I want to track the following:
Product
Date installed
Name of admin whom installed
Computer installed on
And any other pertinent info (which, ironically, is not pertinent to this inquiry)
Prologue: I have started with creating tables and I know how, in a literal sense, to create relationships. What floors me is how to collect data.
I want to use my form, frmNew_Installs for data input, and envisioned making input easier by having a combobox with all available licensed software. The rest of the info has to be typed in. This form is bound to a table, tblInstalls. On frmNew_Installs, I have submit button whose sole purpose is to move to the new record in tblInstalls. The code behind the button is:
Code:
Private Sub btnSubmit_Click()
DoCmd.GoToRecord , , acNewRec
End Sub
The problem is that when this button is clicked, I get an error message "Run-time error '2105': You can't go to the specified record." So, I went to the table to enter data, and when I click on the second row (table has only one row of data), I get the following message: You cannot add or change a record because a related record is required in table 'tblUsers'.
What I need help with is understanding how data is supposed to flow in related tables. In other words, why does data have to be entered into 'tblUsers' prior to being entered into 'tblInstalls'? For that matter, since there seems to be a priority list, how am I supposed to know which table needs to have input first? Trial and error?
Attached is my db. Thank you for your time.