Tabs, subforms and no data!

BobJones

Registered User.
Local time
Today, 23:48
Joined
Jun 13, 2006
Messages
42
I have a form with two tabs... Its record source is Person and Account.
The main tab has a load of fields relating to the person and the other tab is meant to show the bank accounts that the person has in a subform. However if there is no bank account for the person then nothing will show in either the subform or on the person tab.

I have checked throughly to see if there is anything saying
SELECT Person.*, Account.* WHERE PersonName = etc
which would only get the account and person details if personname was there.

The form is accessed by means of a search form which opens the form like so.
DoCmd.openForm "PersonAccount", , , "[PersonName] = '" & personName.Value & "'"

So any ideas why nothing at all shows not even the Person details?
 
Probably change your query to a Left Join. A small note: You should have AutoNumber as the primary key and pass *that* key rather than a name.
 
ordinarily i would use an autonumber as a primary key but the client insists they want to use names, I have explained to them but they are digging in their heels and think they know best! Ill give what you said a try and we'll see what happens. Cheers


Edit:
Just tried what you said and it worked like a charm, cheers buddy!
 
Last edited:
Glad it worked for you. As for Primary Keys, names can change (marriage) and someone can have the same name but AutoNumbers are unique and will point to an exact record. You know your client best but I suspect this decision will bite you down the road. At the very least you will have to spend extra time getting around the limits of using names as a PK. Good luck.
 

Users who are viewing this thread

Back
Top Bottom