Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can same form open current or create new record

Status
Not open for further replies.

looperboy

Technical User
Dec 12, 2003
37
DE
If I have a table where the primary key is, say, an Email address- is it possible to create a form that will open a current file to be edited if an existing email address is entered into the "Email" field, and create a new record if an email address is entered which does not already exist in the database?
 
Hallo,

To do this I would have the form based on the table, but have an unbound email address field.
AfterUpdate of this field use RecordsetClone and Find to see if a record exists. If it does set the bookmark of the form to the bookmark of the recordset.
If it doesn't use GoTo New Record to set up the new record and write in the email address with a line of code.

Hope that helps. I've not given much detail, so if you need more just post,


- Frink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top