VB School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB Expert!

Join 307,096 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,012 people online right now. Registration is fast and FREE... Join Now!




Picking a field from an Access table on the fly

 

Picking a field from an Access table on the fly

MarkCDAshdown

3 Nov, 2009 - 01:40 AM
Post #1

New D.I.C Head
*

Joined: 3 Nov, 2009
Posts: 1

I have a table that holds data for each month in a separate field - month01, month02, month03 etc.

I want the user to be able to select the appropriate month from a pick list and then run an sql which picks the correct field for that month and displays the data in it.

I am not sure how to format the sql based on the above selection.

Can anyone help? I can configure the sql to filter the data but not the field name! crazy.gif

User is offlineProfile CardPM
+Quote Post


NoBrain

RE: Picking A Field From An Access Table On The Fly

3 Nov, 2009 - 09:23 AM
Post #2

D.I.C Lover
Group Icon

Joined: 25 Mar, 2009
Posts: 1,214



Thanked: 39 times
Dream Kudos: 125
My Contributions
hi smile.gif
try "SELECT * FROM" & TableName & " WHERE 1" as query to SQL smile.gif

good luck
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 11:49AM

Live VB Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month