Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Link Subform to Mainform Combobox

Posted on 2013-05-11
4
Medium Priority
?
656 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

886 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