changing the table that a form gets data from

emcf

Member
Local time
Today, 00:13
Joined
Nov 14, 2002
Messages
209
how do i change the table that a form gets its data from? I want to keep exactly the same format and I have exactly the same table structure and field names.
 
Open the form in design view. Open the properties dialog box for the form. Go to the Data tab. Replace the table name in the RecordSource property.

BTW, it is better practice to use queries as the recordsources for forms and reports so you can include a where clause to limit the records needing to be retrieved from the table.
 
Thanks Pat,

i've now set it up using a query on the original table - makes life a lot simpler!
 
Now that I have got a form using a query from a table is there any way I can allow the form to add records to the table?
on the form properties I have set the 'allow additions' to yes but I still cannot add a new record.....anyone know where I am going wrong???
 
Can you update the table by using the query directly? Open the queyr ahdn try to add a new record or change an existing one.
 
Pat,

tried to update the table by altering info in the query itself - access would not allow this and said 'this record set is not updatable'.
 
Problem sorted! in the query design view i had added another related table to bring through department names....i didn't actually need this - all i had to do instead was to type in the primary key number of the department rather than its name in the query in order to filter the records. the query and form now filter out the correct records and I can update the main table through the form! good start to a monday morning!
 

Users who are viewing this thread

Back
Top Bottom