By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

Find Record/Add New

P: 34
Hi all:

From a main form, after selecting a ID, I need pull up the appropriate record in a separate form. If there is no record for that ID I need to create a new record.

Here's the code I"m using:

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm ("frmPubs")
  2. DoCmd.GoToControl "ID"
  3. DoCmd.FindRecord (ID)
  4. DoCmd.GoToControl "Title"
I figure I need to add in there an If...Then statement, searching through a recordset of my frmPubs. Is there a simpler way of doing this?

Nov 16 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 3,072
Did you consider to use a combobox with the available ID's ?
Using the "Not in List" event you can add a record when not found.

Nov 17 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.