Forms Combo Box

  • Thread starter Thread starter Denver
  • Start date Start date
D

Denver

I have a Form and I have an unbound combo box...
i want this combo box to have all my report name on it, is this possible?
and I want it to open a report every afterupdate, is this possible too?
if this possible can any one help me with my VBA, what would it be look like?

thanks for any help


denver
 
Here's a couple of ways to fill your combo with report names:
List Box of Available Reports
at:
http://allenbrowne.com/ser-19.html

You can then use OpenReport to open it, e.g.:
Private Sub cboReport_AfterUpdate()
If Not isNull(Me.cboReport) Then
DoCmd.OpenReport Me.cboReport, acViewPreview
End If
End Sub
 
hi allen,

i try to use those example you have given and i used the Method2:Callback
Function.
i have now a list box , command button and the check box.

question:
1. when i click the cmdbutton(Report) it gives me a dialog box error
saying....
"Error 2427: You Entered an expression that has no value.
2. what do you mean by this error? i copy all the codes from the examples
3. I don't see any codes for the check box, really no codes for the check box?
4. I want to protect my codes is there anyway i can put an password to it?
to avoid users from changing it except me. how am I going to start my code?

please help me with this error so far all is running will except those
errors..

thanks again..

denver
 
question:
1. when i click the cmdbutton(Report) it gives me a dialog box error
saying....

I don't understand that line. Did you name your button Report or something?
 
Yes i name it Report..
when i click on this button it gives me an
"Error 2427:You Entered an expression that has no value."

this is what it prompts..

sorry for that wrong specifying....thanks again

denver
 
Report is a deserved word.

Name the combo something else, e.g. cboReport, or lstReport if it is a list
box.
 
I am using the list box because it is easy to use..
i name the cmdbutton as Report

but now the error is

Error 2498:An expression you entered is the wrong data type for one of the
arguments.

whats wrong here ? thanks again

denver
 
thanks Mr. Allen it's working now.....

denver

Denver said:
I am using the list box because it is easy to use..
i name the cmdbutton as Report

but now the error is

Error 2498:An expression you entered is the wrong data type for one of the
arguments.

whats wrong here ? thanks again

denver
 
Back
Top