subform disappears when linked

cardgunner

Registered User.
Local time
Today, 03:43
Joined
Aug 8, 2005
Messages
210
I have a subform form that I linked to the main form on the bpid. I view the form and all is good. However when I try to link it to the bpid, alt_id of both the main form and subform all the stuff in the subform disappears. The text boxes and labels all vanish. Strange.
 
If there are no records in the subform that are linked like that, and the subform's record source is not updateable, then it won't show. Also, if the AllowAdditions property of the form or subform are set to NO, and there are no records in the subform's recordset, the subform won't show.
 
Even the labels won't show?
 
Well the form and subform share the same recordsource, which is a Union query. And the bpid and alt id are in the same record, different fields.
 
I think I know the issue which is what you have stated. In my main form is a combo box where I find the record I want and select it. That box shows the [name] field but holds the [bpid] field. the subform looks at that and brings into it that record. I need to add(and hide) the alt_id field in the main form. I don't know how to get the text box info to reflect what the combo box value is. I'm sure there is enough info on the web to find my answer to this next issue. Thanks.
 
The form and subform should NOT share the same query. The main form should have a unique record source from the subform and vice-versa.

Also, a Union Query is non-updateable so records can't be added.
 
Hmmm. Maybe I'm not doing this right then.

I think I need to start from scratch on this one.

On the main form I have a combobox that stores the bpid of the selected record. I linked that value to my 1st subform to give me a set of records. That subform is uneditable. This subform1 is using the same set of records as my combo box.

I created subform2 from a seperate editable query, query2. subform2 is linked to the combobox value.

I then created subform3 form another seperate query, query3. that is linked to combo box value as well.

This db is an openhouse registration. I have our current customers as company names (No Contacts). This info is in company1 table. When people arrive we are going to look up there company. If all the info is right we record the contact info in subform3. That info flows into the contact1 table.

If the company info is not right, or not there, we enter corrected info or new info into subform 2. That info flows into company2 table.

Company1 has unique id=bpid.
company2 has unique id=altid but also has the bpid field given to it by company1 table. All new companies are bpid=99999 and what ever id the computer assigns them

Contact1 has unique id=p_id and shares bpid and alt_id.

For my combobox and subform1 I went with a Union query bringing together company1 and company2. I did this in case a new company comes in a signs in. Later on someone else from this new company comes in. I don't want to create the same new customer twice. So if I joined the 2 tables so I would be able to pick the new company.
 
I'm having a hard time envisioning this. Is there any way you can upload a copy with fake data?
 

Users who are viewing this thread

Back
Top Bottom