Subform resetting

ITguy1981

Registered User.
Local time
Today, 08:26
Joined
Aug 24, 2011
Messages
137
I have a table DailyTime with a form for DailyTime. On the DailyTime form I have a subform called billables. This subform is in datasheet view and is linked to my billables table. The billables table contains the fields item, pricy, and qty. When I open my Daily time form I can enter the data for daily time and enter multiple records in the subform. When I reopen the DailyTime form the data at the top is there, but all of the informaiton I entered in the subform is gone. The billables table however has data was originally entered in the subform. I'm not sure what the issue could be. Has anyone else had a similar problem?
 
Are the parent and child field properties in the subform object set?

Is the criteria of the subform correct?

It sounds to me like they could be saving, but the criteria of the recordset of the subform when it next opens means they are not displayed.
 
In Form Design View, open the Form your Subform is based on, go to Properties - Data and look at the Data Entry Property. I'll bet it's set to 'Yes.' Change this to 'No' and save the Form.

Linq ;0)>
 
The billables table however has data was originally entered in the subform.

I don't think it will be the Data Entry property if it's always showing records, it's just the new ones which aren't returned.

I still think the subform doesn't know it's supposed to be retuirning those new records.


ITGuy - If you open the query / SQL which is set to the recordsource are the newer records displayed?
 
I think I may have many mistakes between the forms, subforms, and possibly relationships. Let me throw out some more info and see what you think would be the best way to accomplish things. I want to be able to open my "daily time form" choose the employee, job location, hours worked etc. I then want a subform, "billables" in datasheet view to be below to enter items billed. The billables table has billableID as an autonumber primary key, item, price, and qty fields. I had a one-to-many relationship, one [Daily Time].[BillableID] to many [Billables].[BillableID]. I'm not 100% positive that is the correct relationship needed. As mentioned before, I was able to enter my daily time and billables, but when I went back to any specific daily time record that was filled in the subform was at record 1 of 1 and blank, but the billables data was in the table. New approaches and help on the relationships is needed. I appreciate the help from before, but I think it might be best to just get some info and redo my relationship and create a new subtable if needed.
 
I was mistaken in the last post on the relationships. I had added a dailytimeID field to billables and it was the one to many relationship with the dailytime table. Once again, I don't know if that is the way to go in doing what i'm trying to do. I've recently taken the relationship out and deleted the dailytime field from the billables table.
 
I don't think it will be the Data Entry property if it's always showing records...

The subform is not 'always showing records!' Only the main form is always populated. The subform is showing no records, despite it's recordsource containinging them, each time the subform is initially opened.

......When I reopen the DailyTime form the data at the top (main form) is there, but all of the informaiton I entered in the subform is gone...The billables table however has data was originally entered in the subform.
The subform is showing new records when they are first entered but not after the (sub)form is closed and re-opened. That's what Data Entry does; shows all records entered during that session but shows no records the next time it is opened

Is this not what the OP is describing?

Linq ;0)>
 
I opened my billable form in design view and the data entry propery is set to no. When I open my Daily Time form I first get a popup asking to enter the parameter value for BillableID. I bet I've changed the layout of this database 5 times to get it to do what I need with no luck. Can I attach my DB so you can look at the two tables and form that I'm having an issue with?
 
When I open my Daily Time form I first get a popup asking to enter the parameter value for BillableID.
You didn't mention this in your intial post. What is causing this to happen?

Clear what's in the Filter property of your subform and turn off the Filter On Load property.

Also, recheck your Link Master/Child Fields properties. That is, re-link them.

Finally, in the underlying Record Source of your subform, if it's a query, check that you haven't provided any criteria that will cause it to restrict certain records.
 
Problem resolved. I went back and put a DailyTimeID in the Billables table. One to many relationship between DailyTime table and Billables table joined by DailyTimeID. I changed the data entry on the billables form to "no". At first I still had issues, but they went away after these changes were made and the subtable was removed from the daily time form and added again. Thank you everyone for you input. It got me on the right path.
 

Users who are viewing this thread

Back
Top Bottom