[AccessD] Rename labels and bind textboxes programmatically

Tom Keatley tomk at multiline.com.au
Thu Oct 30 17:08:47 CST 2003


> I need to create a lot of forms. All with the same
> layout.
> Top of the page has a listbox (lstHeader) that shows
> all fields/records from a table.
> Bottom of the page has 11-54 textboxes (the number of
> textboxes equals the number of columns in the textbox)

If I understand what you need correctly .....

If each of these forms are to always open to the same recordsource you could
set one form up, copy it and use something like Rick Fishers "find and
replace"to rename your fields/recordsource to what you need in each form.

If you set up ONE form with all your controls you could have an option group
of toggle buttons and a case statement....

eg....

Private Sub toggle_Click()

select case toggle

case 1
lstHeader.RowSource = "tblTest"
'the rest of your code
'etc etc etc

case 2

lstHeader.RowSource = "tblTest02"
'the rest of your code
'etc etc etc

case 3

lstHeader.RowSource = "tblTest03"
'the rest of your code
'etc etc etc

end select

end sub

hope it helps

Tom Keatley




More information about the AccessD mailing list