Combo box + populating other fields (1 Viewer)

RCheesley

Registered User.
Local time
Today, 09:44
Joined
Aug 12, 2008
Messages
243
Hi all,

I'll do my best to explain this situation but I'm somewhat confoozling myself! :confused:

I have a form, on which there is a combo box for the user to select the name of the person who referred the application being completed.

The combo box stores the ReferrerID in the database but displays the referrer's firstname/surname for ease of selection.

I want to be able to run a mail merge from this form, which means I will somehow need to incorporate the full name & address of the referrer into the query.

Is there any way I can do this using, for example, some hidden fields? I would need the address to be shown based on what was selected in the combo box, the address comprises of

ReferrerID
ReferrerFirstName
ReferrerSurname
ReferrerAddress1
ReferrerAddress2
ReferrerTown
ReferrerCounty
ReferrerPostcode

Any ideas greatly appreciated :)

Ruth x
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 18:44
Joined
Jan 20, 2009
Messages
12,856
Get the information you need from the the Referrer table using a domain lookup and the condition as the selection in the combobox.

DLookUp("FieldName", "tblReferrer", "tblReferrer.ReferrerID=combobox")

Use this depending on how you do your merge. If it is for a hidden textbox put an equal sign in front and put it in the Control Source of the textbox.
 

RCheesley

Registered User.
Local time
Today, 09:44
Joined
Aug 12, 2008
Messages
243
Hiya,

Thanks for that advice, I hadn't come across the DLookUp function before. I will give it a play and see whether it'll do what I need! Many thanks!

Ruth
 

Users who are viewing this thread

Top Bottom