form question

badangel

Registered User.
Local time
Today, 11:30
Joined
Jan 31, 2003
Messages
26
Hi, I have a fairly simple question i think. I want to create a form for the user to input new customer details but how do i get a blank form to come up then transfer the details into my customer table? I think once i get the empty form I know how to put the details into the table but the forms I have tried all have current customer details in them.
 
okay.....from how it sounds you seem to have got yourself pretty confused here!!

By creating a form your also creating a way to display your current records.

The forms you have tried will be showing current customer records... however if you click right on the record navigation arrow untill you've scrolled through all your records... and then you should reach a blank record...fill this in and...your done. A new record.

Your using your form to display records from your table...You can also delete, edit and add records in your table from your form.

The fact that your form displays current records shows its correctly linked ...(by control source) to your customer table...

To have the form open automatically on a blank record..then place this code in the 'on open' event of your form

Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
End Sub
 
Yeah, I'm always pretty confused! Thanks for your help. I knew the form etc was working fine and just wanted it to start at a blank entry. So if I do what you sugest as well as hide the scroll bars etc, the user won't be able to view any of the other records? Also, am I right in thinking I can display a message box to say details entered corectly farily straightforwardly using code? I will try and work it out myself but any pointers would be extremely helpful.

Thanks again;)
 
The problem with hiding the scroll bars etc. to make this form only so users view a new record...is that they will only be able to enter one customer details at a time. e.g if they entered a set of customer information in, then they would need to re-open the form to add more!...however if you follow a button wizard to create a 'new record' then users could simply press that.

Yep using code you'll find it pretty simple to add a message box.
Simply write your code with your vaidations..then where neccessary add the code

If MsgBox("Your message here", vbYesNo, "Message title here") = vbYes Then
Me!Your validation line
Else
Me!Your alternate validation = False
End If

Sarah
 
If you only want to enter new records then set the DataEntry to yes on the forms property sheet
 

Users who are viewing this thread

Back
Top Bottom