R
rob
Hey folks, I think I'm reinventing the wheel...
I created a simple form with some combo boxes that pulls down PKID's from
records in two different tables, then appends it into a third table (used in
a query).
- The first combobox gets it's values from a table and stores the ID of the
Ratee into a variable
- The second combobox gets it's values from a table and stores the ID of the
Rater into a variable
- I also have a textbox that is a date -- I also store this into a variable
I create a simple Append Query to add a record into my evaluation table
(minus the error handling):
sql = "INSERT INTO tblEvals ([Ratee], [Rater], [Eval Closeout]) VALUES ("
+ Ratee + Rater + ", #" + closeout + "#)"
DoCmd.RunSQL sql
Simple stuff... it works just fine...
Here's my dilemma:
Now I want to open a form (the record source is a query) with this new
record that I just created. How do I load the PKID of tblEvals into a
variable so I can use it to open the correct record in my form view?
Or, is thier an easier way?
Rob
I created a simple form with some combo boxes that pulls down PKID's from
records in two different tables, then appends it into a third table (used in
a query).
- The first combobox gets it's values from a table and stores the ID of the
Ratee into a variable
- The second combobox gets it's values from a table and stores the ID of the
Rater into a variable
- I also have a textbox that is a date -- I also store this into a variable
I create a simple Append Query to add a record into my evaluation table
(minus the error handling):
sql = "INSERT INTO tblEvals ([Ratee], [Rater], [Eval Closeout]) VALUES ("
+ Ratee + Rater + ", #" + closeout + "#)"
DoCmd.RunSQL sql
Simple stuff... it works just fine...
Here's my dilemma:
Now I want to open a form (the record source is a query) with this new
record that I just created. How do I load the PKID of tblEvals into a
variable so I can use it to open the correct record in my form view?
Or, is thier an easier way?
Rob