blank form in form view but fields present in design view

borisbruno

Registered User.
Local time
Today, 09:41
Joined
Oct 14, 2005
Messages
39
After reading many of the posts here, I decided that one of the problems with the tables in the db I was working on was in the primary keys. I had used the same field name as the primary key in all of my tables. This was RecipID, which was a user entered textbox with an example in a label beside it showing the format to use.

After reading stuff here, I decided this wasn't a good idea. So I changed RecipId to be an autonumber in the parent table (Household_Info) and a long integer foreign key in the children. Also, I added some fields to the parent table to identify the head of household (lastname, firstname)

I already had a continuous form made with a subform and a pop-up form associated with it based on my previous tables. Reran the query underlying the form, and the new fields showed up in the field list box for the form. The fields are all still present in design view, but I get a totally blank form in form view. I checked the forms recordsource and made sure that it was set to the new query.

Can anyone give me an idea about what I'm overlooking? Do I have to recreate the form?

(Sorry if this is a repeat of a question someone has already addressed, but I couldn't turn up any relevant threads after several hours of searching.)

Thanks, Charlotte
 
You are describing normal Access behavior when no records are returned by the underlying query/table. Do you have any filters applied? Try executing the RecordSource in the QueryBuilder as a stand alone and see if any records are returned.
 
RG,

Thanks for responding. No, a stand alone query doesn't return any records; however, all that is in my tables is a few test records that I input before making the primary/foreign key changes.

As far as I can remember, I never intentionally applied any filters, but since the copy I've been messing around with is a test copy of my original, maybe there is something in my original copy that I set up that is causing the problem. But then again, the original form shows up fine, as did the form in the test copy until I made those table changes.

Charlotte
 
Does the query have any Criteria specified? If not, then why does it not return the few records you added?
 
RG,

There was no criteria set and I'm not sure why it wouldn't return any records. However, as a result of your suggestion, I went in and built and rebuilt a query adding one table at a time. This way I got records to show at each stage of the build. Then I reset the forms RecordSource to the biggest query and it's working.

Thank you. Charlotte
 
Pat,

I checked the AllowAdditions property and it was set to yes. I'm really not sure what happened, but at least that part is working now.

My next question is how do I get the foreign key field that I added in my tables to automatically fill. I have 4 tables tied to a continuous form, but only the parent table is capturing the RecipID where it is an autonumber primary key. How do I make the children capture this entry as well? The other fields in the children are being captured.

Thanks for you help. Charlotte
 
Glad you got it working. Another one of life's little mysteries.
 
Pat,

I don't know how to do this; I can't find where to set master/child properties as 3 of the child tables are on the main form as a continuous form. Maybe my terminology isn't correct. I used selected fields from 4 separate tables for my main form. This was the parent table and 3 child tables. Plus the main form has a subform. The subform is working correctly and all the information is being captured in its underlying table, including the foreign key. The problem is that the other 3 child tables aren't inheriting the primary key value of the parent table in the foreign key field in their individual tables.

Maybe, I have to go back and build subforms, and then lay them on the main form. The reason I went the way I did was to give the users a form as similar as possible to the form they were used to using. I'm doing this for a food bank in a small rural community, and everyone involved is a volunteer.

Any input is greatly appreciated. Thanks for everyone's help so far.

Charlotte
 
Pat,

Thank you for your help. I just went back and made forms out of the fields from the child tables and then put them back onto the main form as continuous subforms.

Charlotte
 

Users who are viewing this thread

Back
Top Bottom