PC Review


Reply
Thread Tools Rate Thread

Combo Box value is null

 
 
Pam
Guest
Posts: n/a
 
      18th Jun 2008
I'm creating a combo box for the first time. I've got it set up in a form.
The values are on a separate worksheet range. The purpose is to have the
user choose a value from the combo box and then data on a worksheet is
filtered by that value. I've tried finding the information from other
discussions, but I'm not getting it. Can you help?

My code is:
Dim PrNo As String
PrNo = ProjectNumberComboBox
Sheets("Data").Select
Range("A1:AH16").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$AH$16").AutoFilter Field:=1, Criteria1:=PrNo
ProjectNoMenu.Hide
 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      18th Jun 2008
To get the data from the combobox use

userform1.Combox1.text

when you type the line into VBA you should see after the userform and then
period a box pop up showing you the items on the Userform. the combobox name
should be one of the items.

"Pam" wrote:

> I'm creating a combo box for the first time. I've got it set up in a form.
> The values are on a separate worksheet range. The purpose is to have the
> user choose a value from the combo box and then data on a worksheet is
> filtered by that value. I've tried finding the information from other
> discussions, but I'm not getting it. Can you help?
>
> My code is:
> Dim PrNo As String
> PrNo = ProjectNumberComboBox
> Sheets("Data").Select
> Range("A1:AH16").Select
> Selection.AutoFilter
> ActiveSheet.Range("$A$1:$AH$16").AutoFilter Field:=1, Criteria1:=PrNo
> ProjectNoMenu.Hide

 
Reply With Quote
 
Pam
Guest
Posts: n/a
 
      18th Jun 2008
Thank you. You all are life savers for the ignorant. =o)

"Joel" wrote:

> To get the data from the combobox use
>
> userform1.Combox1.text
>
> when you type the line into VBA you should see after the userform and then
> period a box pop up showing you the items on the Userform. the combobox name
> should be one of the items.
>
> "Pam" wrote:
>
> > I'm creating a combo box for the first time. I've got it set up in a form.
> > The values are on a separate worksheet range. The purpose is to have the
> > user choose a value from the combo box and then data on a worksheet is
> > filtered by that value. I've tried finding the information from other
> > discussions, but I'm not getting it. Can you help?
> >
> > My code is:
> > Dim PrNo As String
> > PrNo = ProjectNumberComboBox
> > Sheets("Data").Select
> > Range("A1:AH16").Select
> > Selection.AutoFilter
> > ActiveSheet.Range("$A$1:$AH$16").AutoFilter Field:=1, Criteria1:=PrNo
> > ProjectNoMenu.Hide

 
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
Form filter combo box choices are Is Null/Is Not Null AccessMan Microsoft Access 13 11th Jun 2009 09:57 PM
Form filter combo box choices are Is Null/Is Not Null AccessMan Microsoft Access Forms 3 6th Jun 2009 08:07 AM
Combo Box and Is Null Martin Microsoft Access VBA Modules 4 19th Dec 2007 10:39 AM
Combo box null value Grant Microsoft C# .NET 0 21st May 2004 07:48 AM
Null Value in Combo Box Pavithra Microsoft Access Form Coding 0 17th May 2004 02:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:51 PM.