Data not saved after entered in Form

avalon60

Registered User.
Local time
Today, 17:06
Joined
Jun 3, 2012
Messages
53
I am not sure where this thread should be in forms or queries.

I have database which has 3 linked tables by ID in each table.
I have built a query on the 3 tables, then created the form. Now when I enter data on the form and save it, when I open up the said form again , the data is not there. Yet the data is in both the table and query

If I only use 1 table, then there is no problem.
The record source for the form is the query, and the query uses the 3 tables.

I have done something wrong somewhere but cannot see it.
 
Check the Data Entry property of the form.
 
Data entry property is set to Yes.

Is there anything else I should look for.
 
First: what is the problem exactly. In the title you say data is not saved, in the text you say the data is there in the table, but is just not shown in the form.

In Access: data is always held in a table, sometimes selected using a query and then displayed using a form.
 
No, you've found the answer. ;)
 
First: what is the problem exactly. In the title you say data is not saved, in the text you say the data is there in the table, but is just not shown in the form.

In Access: data is always held in a table, sometimes selected using a query and then displayed using a form.

After I have entered some data into the form, then close the form down. After I re open the same form there is no record of the data I had previously entered, and the form is blank so to speak.

All the names of the items are ticked in the forms query if that is what you
mean by selected.
 
Change...the...data...entry...property.
 
Ok I have done that, but it has made no difference, as the records are not showing in the form.
 
Even if you open the form from the navigation pane? Is any code running when the form opens? Can you post the db here?
 
When I open up the form from the navigation pane, there are no records showing .

I'll see what I can do to post it here, but tomorrow now as its pretty late on here.
 
what pbaldy was saying was to do with the dataentry property

if this is set to YES, then the form only allows you to enter new records, and not see existing ones. Set it to NO.
 
what pbaldy was saying was to do with the dataentry property

if this is set to YES, then the form only allows you to enter new records, and not see existing ones. Set it to NO.

I already did that last night, but it has made no difference.
Also for curiosity, I built a new db from scratch using 3 tables, then entered some data /records. In then saved and closed the form, but on re opening the form no records were showing. I also checked the data entry property was set to NO.
 
Well, in this sample, the query the form is based on returns no records, so obviously none would be displayed by the form. You may want to edit the joins in that query to ensure records are returned.
 
Ok, on looking at the joins of the 3 tables, and then properties, I see there are 3 options.
The 1st is the default one: Only include rows where joined fields from both tables are equal.
The 2nd one is to include ALL records from tblElectric and only those records from tblEONEnergyFixed1yrV12
while the 3rd one is that the 2 tables are swapped in the wording.

Now I just tried selecting the 2nd option, but the form could not be loaded because it contains ambiguos outer joins.

So how else should I edit them.
 
At a glance, I don't see how the tables could be related by autonumber fields. Do the tables relate to each other? If so, how?
 
All 3 table are related by the ID which is the autonumber. This works ok if all 3 tables are combined into one, well there is no problems with records and data.

1 table has the overall amounts, while the other 2 tables show only their respective amounts or figures.
I don't see how they can be related other than ID autonumber.
 
Typically the main table would have an autonumber field. In a related table there would be a Long Integer field that held the relating value (there might also be an autonumber field, but it would not be the field that relates to the main table). You could never be sure autonumber fields stayed in sync with each other. Which one do you consider the main table? Right now your "tblEONE..." table has one record with an ID of 27. The electric table has 3 records with IDs of 2,3 & 4. By your logic, there is no relationship between the records in the two tables.
 
The main table is the tblEONE....., which as you know has an ID with autonumber
Regarding the ID numbers in the other tables, that has only come about due to me starting over and over again when the main form did not save the records, and at that time not realising they were in one or both other tables.

I added another field and gave it a different name from ID, called ElecID and GasID, but that produced further problems, in that the form was more or less blank with no text boxes or labels. When I went into form Design, the fields and labels were there???

Thanks
 
Last edited:

Users who are viewing this thread

Back
Top Bottom