Runtime Error '91' seems EXTREMELY simple.

R

RoyVidar

Brandon Johnson wrote in message
Its throwing me a runtime error on this line: Anyone have any clue
why. i think today is my off day. :)

cboPromote.Recordset = "SELECT Client, PromoteGroup FROM
tblItemPromoteGroups WHERE Client = " & chr$(34) & cboPromoteClient &
chr$(34) & ";"

When using dynamic SQL, assign it to the rowsource of the combo, not
the
recordsource property.
 
B

Brandon Johnson

Its throwing me a runtime error on this line: Anyone have any clue why.
i think today is my off day. :)

cboPromote.Recordset = "SELECT Client, PromoteGroup FROM
tblItemPromoteGroups WHERE Client = " & chr$(34) & cboPromoteClient &
chr$(34) & ";"
 
R

RoyVidar

Brandon Johnson wrote in message
oh ya now it clicks. im seriously loosing it. :). another quick
question. how do i just make it show the promotegroup in the cbobox
rather than both?

In the format properties of the combo, set the columnwidth property of
the first column to 0
 
B

Brandon Johnson

oh ya now it clicks. im seriously loosing it. :). another quick
question. how do i just make it show the promotegroup in the cbobox
rather than both?
 
D

Douglas J. Steele

You can't set the Recordset for a combo box that way. You can, however, set
its RowSource.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top