Connecting Tech Pros Worldwide Help | Site Map

New to VBA

  #1  
Old August 25th, 2007, 05:45 AM
abbritton@gmail.com
Guest
 
Posts: n/a
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

  #2  
Old August 25th, 2007, 03:25 PM
Steve
Guest
 
Posts: n/a

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
>

  #3  
Old August 25th, 2007, 04:25 PM
StopThisAdvertising
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
New to VB.Net; Struggling with Architecture... Johnny Meredith answers 3 November 22nd, 2005 06:29 PM
relatively new to database moriman answers 3 November 13th, 2005 04:09 PM
New to VB.Net; Struggling with Architecture... Johnny Meredith answers 3 July 21st, 2005 10:21 PM