Connecting Tech Pros Worldwide Help | Site Map

New to VBA

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 25th, 2007, 04:45 AM
abbritton@gmail.com
Guest
 
Posts: n/a
Default New to VBA

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, 02:25 PM
Steve
Guest
 
Posts: n/a
Default 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, 03:25 PM
StopThisAdvertising
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.