AddClient Form

CarlRostron

Registered User.
Local time
Today, 00:38
Joined
Nov 14, 2011
Messages
88
I have a form on which I have placed a Button which opens my AddClient Form. However, I am not sure how I link this AddClient form data source to my client table as at the moment with empty fields but the ID field of the client automatically generated. The Contact ID field int he table is an autonumber already though.

Thanks
 
Sorry, what's the question? Do you need to communicate the ID of a newly created client back to the form that initiated the insert? Something like that?
Cheers,
 
I would like to be able to click a button which opens up another form where the user can insert a new client. Within that new form all the field should be empty except for the ID field which would be autofilled by Access.

I hope that makes more sense.
 
OK, got it. So what is your question about that? Do you need to know how to create a form? How to put a button on a form? How to make a button open a form? OK?
There's a million topics here. If you don't ask a specific question you don't get a specific answer. :)
Cheers,
 
I need to know how to add a new record to my clients table from the AddClient form. I already have the MainClientList form and the Button to open the Add Client form. But when the AddClient form opens how do I ensue the fields are empty for the user to populate but at the same time have Access add the new record with the next recordID value?
 
Check out the DoCmd.OpenForm method, which has a parameter called DataMode ...
Code:
DoCmd.OpenForm "TestForm", , , , acFormAdd
... and if you specify acFormAdd for that parameter, the form opens in DataEntry mode, which means it's showing a new record. If you type in even one character it generates a new ID and *poof,* you're in business.
HTH
 
Ok thanks I will give this a whirl shortly and repost if I am still struggling. Thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom