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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Boxes and queries, strSQL (Easy...again) 1

Status
Not open for further replies.

Emblem1

Technical User
Jan 11, 2007
77
US
Hi.

I just want to say first that Tek-Tips is the greatest things since sliced bread! I sure have learned a lot!

On a form I have 2 combo boxes - Sign1Type, and CSign1. Sign1Type gets it's data from a query, which in SQL
view is like this:

SELECT tblSigns_forwattageForms.[Sign ID], tblSigns_forwattageForms.Description, tblSigns_forwattageForms.[Face Size], tblSigns_forwattageForms.[Lighting Type], tblSigns_forwattageForms.[# Bulbs or Panels], tblSigns_forwattageForms.[# Faces], tblSigns_forwattageForms.[Total Wattage]
FROM tblSigns_forwattageForms
ORDER BY tblSigns_forwattageForms.[Item Number];

[Sign ID] is selected by the user in the Sign1Type combo box. I then want to place the [Total Wattage] data, from column 7 for the selected Sign ID, into the CSign1 combo box. I still haven't figured out the strSQL coding for vba yet.

Thanks in advance.
 
A starting point (in the AfterUpdate event procedure of Sign1Type):
Code:
MsgBox Me!Sign1Type.Column(6)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
ok...that WAS easy.

I did this...

Me.CSign1.Value = Me.Sign1Type.Column(6)

So I assume that the first column is considered column 0 (zero)?

:)
 
So I assume that the first column is considered column 0 (zero)?

Yep [smile]

HarleyQuinn
---------------------------------
Black coat, white shoes, black hat, cadillac. The boy's a timebomb!

You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before post
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top