Click here to Skip to main content
15,908,111 members
Home / Discussions / Database
   

Database

 
GeneralRe: Join performance Pin
Xmen Real 3-Aug-09 2:45
professional Xmen Real 3-Aug-09 2:45 
GeneralRe: Join performance Pin
Vimalsoft(Pty) Ltd3-Aug-09 3:07
professionalVimalsoft(Pty) Ltd3-Aug-09 3:07 
GeneralRe: Join performance Pin
Xmen Real 3-Aug-09 3:21
professional Xmen Real 3-Aug-09 3:21 
QuestionSQL query: Get correspondence descriptions instead foreign key IDs. Is that possible ? Pin
sdancer7531-Jul-09 5:00
sdancer7531-Jul-09 5:00 
AnswerRe: SQL query: Get correspondence descriptions instead foreign key IDs. Is that possible ? Pin
Blue_Boy31-Jul-09 7:12
Blue_Boy31-Jul-09 7:12 
QuestionSQL SP exception: "Incorrect syntax near '-'" Pin
cdietschrun31-Jul-09 4:14
cdietschrun31-Jul-09 4:14 
AnswerRe: SQL SP exception: "Incorrect syntax near '-'" Pin
That's Aragon1-Aug-09 1:56
That's Aragon1-Aug-09 1:56 
QuestionHow to Use an Array Variant as a control name? Pin
dpminusa31-Jul-09 2:00
dpminusa31-Jul-09 2:00 
I have a Tab control with 15 tabs. I am using the TabCtl.Value in Select statements to control the ListBoxes, Reports, etc. for each tab. It occurred to me that I could simplify this greatly by defining a Variant Array of the ListBox names and report names. Then I could simply use array(TabCtl.Value) instead of the Select Statement details.

The problem is that I cannot see how to make the array(TabCtl.Value) into a Control name that accepts property or method references. It seems like this should be simple, but I have tried a few things with no success.

I am using Access 2007 on Vista Bus 32. Here is a sample of my code: (I have used the same names for the Queries, ListBoxes, Reports, etc. as a way of maximizing the usefulness of the one array and as an aid to reducing misspellings during coding. I find this less confusing than a lot of similar names.)

'An Array of Query Names to use as the RowSource for A Tab ListBox.
Dim lstFindRptNames As Variant
    
    lstFindRptNames = Array("lstByCusName", _
    "lstByContact1", _
    "lstByContact2", _
    "lstByContact3", _
        ...
    "lstByProspect", _
    "lstByCustomer")


'Populate the ListBox by referencing a Query of the same name as the RowSource
lstFindRptNames(TabCtl0.Value).RowSource = lstFindRptNames(TabCtl0)


This fails because Access does not seem to substitute the String, in context, with the Control of the same name. So I tried to help it out with making a Control with a DIM first, I also tried a Generic Object. Neither of these lead to a solution.

In several other languages, other than VBA, this is a non-brainer. What am I missing?

"Coding for fun and profit ... mostly fun"

AnswerRe: How to Use an Array Variant as a control name? Pin
Luc Pattyn31-Jul-09 2:22
sitebuilderLuc Pattyn31-Jul-09 2:22 
GeneralRe: How to Use an Array Variant as a control name? Pin
dpminusa31-Jul-09 9:53
dpminusa31-Jul-09 9:53 
GeneralRe: How to Use an Array Variant as a control name? Pin
Luc Pattyn31-Jul-09 10:20
sitebuilderLuc Pattyn31-Jul-09 10:20 
GeneralRe: How to Use an Array Variant as a control name? Pin
dpminusa31-Jul-09 10:28
dpminusa31-Jul-09 10:28 
QuestionFull Text Search Pin
ps_prakash0230-Jul-09 21:33
ps_prakash0230-Jul-09 21:33 
QuestionData Retrieval Pin
mgr_2k730-Jul-09 20:25
mgr_2k730-Jul-09 20:25 
AnswerRe: Data Retrieval Pin
Blue_Boy30-Jul-09 21:37
Blue_Boy30-Jul-09 21:37 
Questionsql server 2005 installation Pin
Spurple30-Jul-09 18:14
Spurple30-Jul-09 18:14 
AnswerRe: sql server 2005 installation Pin
Mycroft Holmes30-Jul-09 20:24
professionalMycroft Holmes30-Jul-09 20:24 
GeneralRe: sql server 2005 installation Pin
Spurple30-Jul-09 23:48
Spurple30-Jul-09 23:48 
AnswerRe: sql server 2005 installation Pin
Eddy Vluggen31-Jul-09 6:14
professionalEddy Vluggen31-Jul-09 6:14 
AnswerRe: sql server 2005 installation Pin
Jerry Hammond2-Aug-09 3:55
Jerry Hammond2-Aug-09 3:55 
AnswerRe: sql server 2005 installation Pin
Robin_Roy3-Aug-09 0:16
Robin_Roy3-Aug-09 0:16 
QuestionMS SQL 2005 - merge new rows and tables Pin
Member 469202330-Jul-09 8:59
Member 469202330-Jul-09 8:59 
AnswerRe: MS SQL 2005 - merge new rows and tables Pin
Robin_Roy30-Jul-09 16:40
Robin_Roy30-Jul-09 16:40 
AnswerRe: MS SQL 2005 - merge new rows and tables Pin
Mycroft Holmes30-Jul-09 16:54
professionalMycroft Holmes30-Jul-09 16:54 
Question.NET DataGridView question Pin
Art Frank30-Jul-09 7:56
Art Frank30-Jul-09 7:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.