By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,950 Members | 989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,950 IT Pros & Developers. It's quick & easy.

integer in code

P: n/a
How can i replace the integer in a Where condition with an Integer
froma select Case?
In the following part of my code, where the number of the customer is
written,, i want to write the integer Z as :

Dim Z as Integer

Select Case Me![Office]
case 1
z = 1
case 2
z = 2
etc etc
End Select

But after writing the code as :
AND ((customers.afid)= Z)

If insread, i write say 2, then the report is OK

the report is opened blank.Where am i wrong?
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 27 Jan 2004 12:55:37 -0800, fr*******@abv.bg (John) wrote:
How can i replace the integer in a Where condition with an Integer
froma select Case?
In the following part of my code, where the number of the customer is
written,, i want to write the integer Z as :

Dim Z as Integer

Select Case Me![Office]
case 1
z = 1
case 2
z = 2
etc etc
End Select

But after writing the code as :
AND ((customers.afid)= Z)

If insread, i write say 2, then the report is OK

the report is opened blank.Where am i wrong?


When you ask a question like this about "the code", it's best to show the
code, so we know what you're talking about. I presume "AND ((customers.afid)=
Z)" is part of a string you're building and occurs within quote marks
somewhere.

So, given that, you need ... AND ((customers.afid)= " & Z & ") ...
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.