Opening a form to the correct record (VBA)

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
 
R

rob

Disregard! I was trying to reinvent the wheel!

(I've been in MGMT for the last 15 years...my programming skills are a
little rusty)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top