Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box / Text Box Problem

Status
Not open for further replies.

Boots6

Technical User
Aug 12, 2011
91
US
I have an "RFI" and a "SUBMITTAL" form. Both of them have "TO" combo boxes connected to the "Contacts" table as a look-up field. On the "RFI" form, I made the "TO" combo box, added all of the fields from the "Contacts" table that I needed for the form so the Control Source is To and the Row Source is SELECT [CONTACTS].[ID], [CONTACTS].[L_NAME], [CONTACTS].[STREET_ADDRESS] FROM CONTACTS; I ended up with 7 columns, set the Column Count to 7, Column widths to 0" except for the [L_NAME] which I set to one. Then I made text boxes for the other information I needed and made the Control Source =[TO].[Column](2) or whichever column I wanted to appear. It worked just great.
I copied everything over exactly to the "SUBMITTAL" form and it isn't working. It has the same everything in all of the tables and forms. I can see my "TO" combo box names, but the text boxes do not auto-populate like they do on the "RFI" form. Is there soemthing I'm missing? All of the information in the corresponding tables and fields looks exactly the same. Help!

Thanks
 
How are ya earmatys . . .

Confusing ... You say:
earmatys said:
[blue] ... the Control Source is To and the Row Source is [purple]SELECT [CONTACTS].[ID], [CONTACTS].[L_NAME], [CONTACTS].[STREET_ADDRESS] FROM CONTACTS;[/purple] [red]I ended up with 7 columns,[/red] ...[/blue]
How you wound-up with seven columns when your SQL only has three ... ([purple][ID], [L_NAME], [STREET_ADDRESS][/purple]) ... is beyond me! Explain this ... please!

[blue]Your Thoughts? . . .[/blue]


See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
I should have put an etc.. behind my last one. I didn't put all of them on my post, but I ended up with 7, including ID, Full Name, Title, Street Address, City, State, Zip
 

...so the Control Source is To and the Row Source...

The Control Source of what is TO?

If the Control Source of the Form contains a field called 'TO' then you have a conflict. If you have a control whose Record Source is 'TO' and a control named 'TO' Access won't be able to figure out if you mean the Field 'TO' or the Control 'TO' -- and it defaults to the Field. I nearly drove myself crazy (some people say I succeded) with a similar situation not too long ago. You may have to rename your control or your field. This is why naming conventions use prefixes (like cboTO or txtTO) to differentiate. I purposely violated the 'rules' in an attempt to be clever and ended up completly baffled until the little lightbulb went on. I don't do that anymore.
 
I did just that. I renamed the fields to ST_TO and got it to work. Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top