I have two different databases with tables that have similarities. The first database has a table with "temporary" information. The second database is used for "formal" information. It is in a invironment where you would typicaly have a customer enquiry, you would therefor take down just some critical information like Surname, Initials and contact numbers etc. This kind of info goes into the first mentioned. Once the customer engage in formal business, there would be more information that has to be captured from an application form (in the second database).
Initialy there was a unique temporary Id that will now be entered in the new database table. My idea is to place the entered value in a variable through visual basic, excuse my amateurish code but it looks something like this:
Private Sub TempRecord_GotFocus()
Dim IdNr As String
IdNr = [Tempid]
DoCmd.OpenQuery "Query1"
End Sub
Now Query1 is an update query that has to automaticaly update the respective fields in the "formal" table. My problem is that my access query doesn't "see" the variable,
Why?
Example of query:
UPDATE Table1, NewClients SET Table1.record = [NewClients]![NAME]
WHERE ((([NewClients]![TEMP_ID])=[:IdNr]));
Initialy there was a unique temporary Id that will now be entered in the new database table. My idea is to place the entered value in a variable through visual basic, excuse my amateurish code but it looks something like this:
Private Sub TempRecord_GotFocus()
Dim IdNr As String
IdNr = [Tempid]
DoCmd.OpenQuery "Query1"
End Sub
Now Query1 is an update query that has to automaticaly update the respective fields in the "formal" table. My problem is that my access query doesn't "see" the variable,
Why?
Example of query:
UPDATE Table1, NewClients SET Table1.record = [NewClients]![NAME]
WHERE ((([NewClients]![TEMP_ID])=[:IdNr]));