PC Review


Reply
Thread Tools Rate Thread

How to change contents of combo box?

 
 
LAS
Guest
Posts: n/a
 
      6th Aug 2010
I have this code in a script. gs_sql, when cut and pasted to a query,
returns the expected rows. But after this code is executed, the contents of
the combo box are empty. What am I doing wrong?

cboStudent_ID.RowSource = gs_sql
cboStudent_ID.Requery


 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      6th Aug 2010
When you say "empty", do you mean that there appears to be data in the combo
box (i.e.: the right-hand scroll bar is active), but you cannot actually see
the values?

What version of Access are you using? What's the actual content of gs_sql?
(if you're using Access 2003 and you've got Format functions in your SQL,
you may need to apply the Access 2003 post-Service Pack 3 hotfix
http://support.microsoft.com/kb/945674 )

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
Co-author: Access 2010 Solutions, published by Wiley
(no e-mails, please!)

"LAS" <(E-Mail Removed)> wrote in message
news:i3fhuq$t1v$(E-Mail Removed)...
>I have this code in a script. gs_sql, when cut and pasted to a query,
>returns the expected rows. But after this code is executed, the contents
>of the combo box are empty. What am I doing wrong?
>
> cboStudent_ID.RowSource = gs_sql
> cboStudent_ID.Requery
>



 
Reply With Quote
 
LAS
Guest
Posts: n/a
 
      7th Aug 2010
No, I mean that only one row's worth of white space appears below the empty
input field instead of the normal row per item. No arrow.

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
news:i3go09$kjp$(E-Mail Removed)...
> When you say "empty", do you mean that there appears to be data in the
> combo box (i.e.: the right-hand scroll bar is active), but you cannot
> actually see the values?
>
> What version of Access are you using? What's the actual content of gs_sql?
> (if you're using Access 2003 and you've got Format functions in your SQL,
> you may need to apply the Access 2003 post-Service Pack 3 hotfix
> http://support.microsoft.com/kb/945674 )
>
> --
> Doug Steele, Microsoft Access MVP
> http://www.AccessMVP.com/DJSteele
> Co-author: Access 2010 Solutions, published by Wiley
> (no e-mails, please!)
>
> "LAS" <(E-Mail Removed)> wrote in message
> news:i3fhuq$t1v$(E-Mail Removed)...
>>I have this code in a script. gs_sql, when cut and pasted to a query,
>>returns the expected rows. But after this code is executed, the contents
>>of the combo box are empty. What am I doing wrong?
>>
>> cboStudent_ID.RowSource = gs_sql
>> cboStudent_ID.Requery
>>

>
>



 
Reply With Quote
 
LAS
Guest
Posts: n/a
 
      8th Aug 2010
I have found the problem. It's a "DUH" thing. I was selecting * instead of
the exact columns I needed for the dropdown.

"LAS" <(E-Mail Removed)> wrote in message
news:i3jil8$se5$(E-Mail Removed)...
> No, I mean that only one row's worth of white space appears below the
> empty input field instead of the normal row per item. No arrow.
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
> news:i3go09$kjp$(E-Mail Removed)...
>> When you say "empty", do you mean that there appears to be data in the
>> combo box (i.e.: the right-hand scroll bar is active), but you cannot
>> actually see the values?
>>
>> What version of Access are you using? What's the actual content of
>> gs_sql? (if you're using Access 2003 and you've got Format functions in
>> your SQL, you may need to apply the Access 2003 post-Service Pack 3
>> hotfix http://support.microsoft.com/kb/945674 )
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://www.AccessMVP.com/DJSteele
>> Co-author: Access 2010 Solutions, published by Wiley
>> (no e-mails, please!)
>>
>> "LAS" <(E-Mail Removed)> wrote in message
>> news:i3fhuq$t1v$(E-Mail Removed)...
>>>I have this code in a script. gs_sql, when cut and pasted to a query,
>>>returns the expected rows. But after this code is executed, the contents
>>>of the combo box are empty. What am I doing wrong?
>>>
>>> cboStudent_ID.RowSource = gs_sql
>>> cboStudent_ID.Requery
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo box contents doesn't change when filtering combo box is chan Joe M. Microsoft Access 2 17th Nov 2009 10:38 PM
Make combo boxes change contents depending on other combo boxes =?Utf-8?B?R2x5bm4=?= Microsoft Access Forms 1 9th Dec 2005 01:32 PM
How do I change a buttons contents depending on a cells contents? =?Utf-8?B?S29zaDQyfEVGRw==?= Microsoft Excel Programming 2 16th Feb 2005 02:39 PM
Changing row source in combo box 'B based on contents of combo box =?Utf-8?B?UGFyaWFo?= Microsoft Access Forms 1 17th Sep 2004 10:25 PM
Change and update contents of a dropdown combo .... Mark Rosenkrantz Microsoft Excel Programming 0 12th Jul 2004 10:13 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:46 PM.