PC Review


Reply
Thread Tools Rate Thread

Beginners SQL in VBA help

 
 
t
Guest
Posts: n/a
 
      10th Sep 2008
Hello,
I have a table that has many columns. One is for the county code and
another is for names of each rep for each county. I want to right an sql
that whenever I choose the county code (which is housed on a combo box onthe
form) that the corresponding name would pop in my label. I can take care of
the label stuff but need help with the sql. Whatever sql i tried is not
working.
Can someone help?
Table Name-RepTable
Fields - CountyCode and RepName.
Thanks.
 
Reply With Quote
 
 
 
 
Margaret Bartley
Guest
Posts: n/a
 
      10th Sep 2008
You don't need SQL for this, just VBA
"t" <(E-Mail Removed)> wrote in message
news:141921CC-D3AB-437C-B7CC-(E-Mail Removed)...
> Hello,
> I have a table that has many columns. One is for the county code and
> another is for names of each rep for each county. I want to right an sql
> that whenever I choose the county code (which is housed on a combo box
> onthe
> form) that the corresponding name would pop in my label. I can take care
> of
> the label stuff but need help with the sql. Whatever sql i tried is not
> working.
> Can someone help?
> Table Name-RepTable
> Fields - CountyCode and RepName.
> Thanks.



 
Reply With Quote
 
pietlinden@hotmail.com
Guest
Posts: n/a
 
      11th Sep 2008
On Sep 10, 4:09*pm, t <t...@discussions.microsoft.com> wrote:
> Hello,
> I have a table that has *many columns. One is for the county code and
> another is for names of each rep for each county. *I want to right an sql
> that whenever I choose the county code (which is housed on a combo box onthe
> form) that the corresponding name would pop in my label. * I can take care of
> the label stuff but need help with the sql. Whatever sql i tried is not
> working. *
> * Can someone help?
> Table Name-RepTable
> Fields - CountyCode and RepName.
> Thanks.


you don't need one. If you include the corresponding name in the
rowsource for the combobox (so it will have two columns instead of
just one), you can set the width of the rightmost column to 0, and
then set the control source of your textbox to
=cboCountyCode.Columns(1)

The columns collection is zero-based, so numbering starts at zero...
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginners help bgkgmg Microsoft Excel Programming 2 30th Jun 2008 03:58 AM
beginners help... Daniela Microsoft Excel Worksheet Functions 2 1st May 2008 11:35 PM
More Beginners help! juliekerin Microsoft Excel Programming 5 17th Sep 2004 01:10 PM
.net for beginners Beginner Microsoft Dot NET 6 27th Aug 2004 01:00 AM
R.A.I.D. for beginners. Pete E Asus Motherboards 7 2nd Jun 2004 11:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:08 AM.