Solved

Link Subform to Mainform Combobox

Posted on 2013-05-11
4
625 Views
Last Modified: 2013-05-11
I have a parent form which contains a Combo Box with the following SQL:

SELECT Mid(Claimant,InStr(1,Claimant," ")+1) AS Expr1, Strings.Claimant
FROM Strings
WHERE ((([Claimant] & "")<>""))
GROUP BY Mid(Claimant,InStr(1,Claimant," ")+1), Strings.Claimant
ORDER BY Mid(Claimant,InStr(1,Claimant," ")+1);


I want to link a Subform to the answer that the person chooses in the combo.
The Subform Contains Claimant, so I am trying to figure out how to link claimant.
0
Comment
Question by:seamus9909
  • 2
4 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39158400
set the master/child link fields property of the subformcontrol

but, i think it is not a good thing using a part of the claimant field as the bound column of the combo box, as it is very possible to have duplicate values.

do you have a unique id field for claimants?
it will be best to use the unique id as the bound column of the combo box.
0
 

Author Comment

by:seamus9909
ID: 39158411
I want each record that contains the name Claimant to show in the subform, so its good if there are duplicate values.

I am not sure what the values should be in the subformcontrol however.

Master:  Combo171 ?  How do I pick the correct column being returned in the combo box?
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 39158483
The Bound Column property of the comboBox determines the column being returned.  In your case, setting it to 1 will return Expr1 and setting it to 2 will return Claimant.
bound column
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 39158591
<I want each record that contains the name Claimant to show in the subform, so its good if there are duplicate values.>
please explain



in your expression

Mid(Claimant,InStr(1,Claimant," ")

this will return possible duplicates, i.e.,

with the claimant names

jack smith
john smith
ann smith
dave clark
kent clark
etc..
"smith" will all be listed three times as items in your combo box
"clark" will be listed twice

but this can be eliminated to display as single items respectively
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question