save records from forms in tables

S

Smoki

Hy, I have a problem with my form and saving records from forms in my table!
I have the same fields in tables, like in form and when I fill this fields
and enter command button Save on my form, it doesn't appear in my table.
How to connect my form with tables?
 
D

Dennis

You either need to write code behind your command button to write the data
from the boxes on your form into your table, or make sure the control source
property of the form is set to your table name in which case the data will go
into your table without the need of a save button.
 
S

Smoki

Control source was not set good, but I made it OK now, and it works. Thank you.
I have other qestion now: when I enter data in form and save this in table,
I want to open form to enter new data in fields, but I always open form with
my old data, and this fields are not blank. What to do? I tried with command
button Save record, after that Add new record, but I didn't get what I wanted!
 
S

Smoki

Thanks!
More questions? I think I made some mistake at the beggining. I'm filling
fields, and I can save this records in table, but wneh I close my form, and
open it again, every time I see my first record, fields are not blank.
Where is the problem?
 
M

Mikal via AccessMonster.com

Smoki said:
Hy, I have a problem with my form and saving records from forms in my table!
I have the same fields in tables, like in form and when I fill this fields
and enter command button Save on my form, it doesn't appear in my table.
How to connect my form with tables?

You need to set the record source of the form to be the table. to do this,
open the form in design view and open the properties window by right clicking
the little square in the top left hand corner of the form and selecting
properties from the menu that appears. The properties window will open and
you need to click the Data tab. The top text box is the record source. When
you click in it, a dropdown arrow and a set of elipses will appear to the
right. Click the dropdown arrow. A list of all your tables and queries will
appear. Choose the table you want from that list. Save your changes by
typing CTRL+S and open the form normally. Things ought to work like you
expect them to now. However, you won't need the save button. You will be
directly entering data into the table via the form and when you move to a new
record, the old one will be saved.

HTH

Mike
 
Top