Connecting Tech Pros Worldwide Forums | Help | Site Map

New to VBA

abbritton@gmail.com
Guest
 
Posts: n/a
#1: Aug 25 '07
I'm trying to pull data from column three of a table where column one
matches the value of a form combo box and column two matches the value
of another combo box of the same form. For instance dollars from
column three where the month in column one equals the combo box value
of "July" and column two equals another combo box value of "2007". Is
it best to use SQL and if so could I nest this in VBA code?
Any help is very much appreciated.

Thanks, Andy Britton


Steve
Guest
 
Posts: n/a
#2: Aug 25 '07

re: New to VBA


You can easily do this with a query. Create a query based on your table. Put
the following expression in the criteria of the first column:
Forms!MyForm!NameOfFirstCombobox
Put the following expression in the criteria of the second column:
Forms!MyForm!NameOfSecondCombobox

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@pcdatasheet.com





<abbritton@gmail.comwrote in message
news:1188016553.419421.191060@e9g2000prf.googlegro ups.com...
Quote:
I'm trying to pull data from column three of a table where column one
matches the value of a form combo box and column two matches the value
of another combo box of the same form. For instance dollars from
column three where the month in column one equals the combo box value
of "July" and column two equals another combo box value of "2007". Is
it best to use SQL and if so could I nest this in VBA code?
Any help is very much appreciated.
>
Thanks, Andy Britton
>

StopThisAdvertising
Guest
 
Posts: n/a
#3: Aug 25 '07

re: New to VBA



"Steve" <sorry@private.emailaddressschreef in bericht news:13d0eqq8l0btoab@corp.supernews.com...
Quote:
You can easily do this with a query. Create a query based on your table. Put
the following expression in the criteria of the first column:
Forms!MyForm!NameOfFirstCombobox
Put the following expression in the criteria of the second column:
Forms!MyForm!NameOfSecondCombobox

PC Datasheet

Steve, Why don't you just GET LOST !!!!!!

This is to inform 'newbees' here about PCD' Steve:
http://home.tiscali.nl/arracom/whoissteve.html
Until now 3700+ pageloads, 2375+ first-time visitors
(these figures are real and rapidly increasing)

Why is this ???
Because Steve is the ONLY person here who continues to advertise in the groups.

It is not relevant whether he advertised in *this* particular post or not...
==We want him to know that these groups are *not* his private hunting grounds!

For those who don't like too see all these messages:
==Simply killfile 'StopThisAdvertising'.
Newbees will still see this warning-message.

ArnoR
Closed Thread