| | |
VB Var refering to object in access form
![]() |
Hi.,
I am busy with another access project when an idea occurred to me. Is it possible to refer to an object, lets say a command button - "Com12" using a VB expression. In application as follows:
Do until cnt = 15
str = "Com"&Cstr(cnt)
str.visible = True *****
cnt = cnt +1
loop
where str is string, and cnt is integer.
Normally i would do this:
com12.visible = true,
but the problem comes in where i would need to assign a value to a whole lot of objects.
Is there a way that I can use a varible, defined in a function or procedure to refer to an object in VB?
I am busy with another access project when an idea occurred to me. Is it possible to refer to an object, lets say a command button - "Com12" using a VB expression. In application as follows:
Do until cnt = 15
str = "Com"&Cstr(cnt)
str.visible = True *****
cnt = cnt +1
loop
where str is string, and cnt is integer.
Normally i would do this:
com12.visible = true,
but the problem comes in where i would need to assign a value to a whole lot of objects.
Is there a way that I can use a varible, defined in a function or procedure to refer to an object in VB?
![]() |
Similar Threads
- How to open pdf documents from a Microsoft Access Form (MS Access and FileMaker Pro)
- how to give reference of a form object ? (PHP)
- Auto fill in Access form (MS Access and FileMaker Pro)
- Access in many form (Pascal and Delphi)
- MS Access - Form question (MS Access and FileMaker Pro)
- return a value to php form (PHP)
- Access form expression help (Computer Science)
- Pass Controls of Access-Form to sub in module (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: VB > Access2000 Database Upgrade Path
- Next Thread: How to access rptImage Control of data report runtime?
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





