Solved

Link Subform to Mainform Combobox

Posted on 2013-05-11
4
643 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

680 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