473,326 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Getting a table name from a listbox/combobox with variable tables

controls is used to populate combo/list boxes, now how do you retrieve the table names that those combo/list boxes were using?

I need something in this direction:

Dim dBase As Database
Dim tdf As TableDefs
Dim q As Integer
Set dBase = CurrentDb
Set tdf = dBase.TableDefs
'Me.rtbFeed.Value = Me.rtbFeed.Value

For q = 0 To tdf.Count - 1
If Me.lstCor.rowsource = dBase.TableDefs(q).Name Then
MsgBox dBase.TableDefs(q).Name
End If
Next
Sep 29 '16 #1
1 762
I need something in this direction:

Dim dBase As Database
Dim tdf As TableDefs
Dim q As Integer
Set dBase = CurrentDb
Set tdf = dBase.TableDefs
'Me.rtbFeed.Value = Me.rtbFeed.Value

For q = 0 To tdf.Count - 1
If Me.lstCor.rowsource = dBase.TableDefs(q).Name Then
MsgBox dBase.TableDefs(q).Name
End If
Next
Sep 29 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Geoff Soper | last post by:
How can I get the name of a variable? i.e. $this_is_a_variable = 10; $variable_name = ????($this_is_a_variable); echo $variable_name; // Displays 'this_is_a_variable' Thanks, Geoff
3
by: Martin Mrazek | last post by:
Hi, I have tables named like ag97a027, ag98a027, ... where 97 and 98 is from year 1997, 1998 and a027 is just specification of product type. I need carry out repeated operataions over these...
2
by: James | last post by:
Can anyone please shed some light on the following... I have a framework that uses dynamically created tables, named using an incremental "attribute set ID", as follows: attrdata_1 attrdata_2...
4
by: dixie | last post by:
I want to write a query where one of the two tables in it is variable and its name is picked up from a text box control on an open form. The query is very simple and is only a select query with...
4
by: Sean Berry | last post by:
I have four tables that all have the same column names (50 in each.) I have created an admin program to edit, delete and add records to the tables and would like to use the table name as a...
3
by: ramakanth05 | last post by:
Hi, I have a problem pulling data from a table using the parameter as table name. I have three tables tbl1, tbl2, tbl3 and I want all the records of the table based on the parameter given. ...
0
by: rameshonweb | last post by:
Can some one please tell how to get the table name from a procedure in C#. Thanks in advance
2
by: BulbFresh | last post by:
Hi, I'm a novice Access user and have a simple question but can't seem to find the answer. I have tables imported and named by the user on import e.g. January. I then need to run a query on the...
3
by: Ravi Kotecha | last post by:
Hi guys, I thought this was pretty cool and since I spent 30 mins or so goggling before giving up and figuring out myself I thought I'd share it with you. .... for k,v in...
1
by: svhmhema | last post by:
I have a combobox and a listbox. combobox data is populated from database table.When the user select an item from the combobox, then the listbox will show a certain data from the same table. How do I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.