[thelist] VB syntax help

dn at dittodesign.co.uk dn at dittodesign.co.uk
Tue Jul 30 08:41:01 CDT 2002


Cheers Jon,

> Firstly, where are FirstNumber and SecondNumber coming from?

names of two text boxes I'm trying to use to input the range of
number of products I want to filter. Do I need to declare them
beyond naming them ?

> Secondly, are you sure you don't have to do a Me.Refresh or Me.Requery or
> something like that?

I have no idea but I've stuck it in any way.

> There are great VB lists at:
> Beginners - http://peach.ease.lsoft.com/archives/visbas-beginners.html
> Advanced  - http://peach.ease.lsoft.com/archives/visbas-l.html
>

I'm off over there now thanks.

regards,

Darren Yates
dn at dittodesign.co.uk
http://dittodesign.co.uk
0161 281 1190


----- Original Message -----
From: "Jon Haworth" <jhaworth at witanjardine.co.uk>
To: <thelist at lists.evolt.org>
Sent: Tuesday, July 30, 2002 1:30 PM
Subject: RE: [thelist] VB syntax help


> Hi Darren,
>
> > Can anybody please help me with this bit of VB.
> > Its not my bag and I need to get it sorted out today.
>
> I'll give it a go...
>
> > Private Sub Calculate_Phones_Click()
> > Me.Filter = " PostcodeMain = '" & PostcodeMain & _
> >   "' AND NumberOfPhones >= " &_
> >   FirstNumber & " AND NumberOfPhones <= " & SecondNumber
> > Me.FilterOn = True
> > End Sub
>
> Two immediate things leap to mind:
>
> Firstly, where are FirstNumber and SecondNumber coming from? If they're
> variables, you're not declaring them anywhere that I can see, and if
they're
> controls, you need to reference them as Me.FirstNumber and
Me.SecondNumber.
>
> Secondly, are you sure you don't have to do a Me.Refresh or Me.Requery or
> something like that? I think this is less likely, but it depends on how
your
> form works... don't know if you can do bound and unbound controls in
Access
> (I haven't played with it in a while)
>
> There are great VB lists at:
> Beginners - http://peach.ease.lsoft.com/archives/visbas-beginners.html
> Advanced  - http://peach.ease.lsoft.com/archives/visbas-l.html
>
> Cheers
> Jon
>
>
>
>
>
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>




More information about the thelist mailing list