Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I fill a variable with Fieldname

Status
Not open for further replies.

SiberBob

Programmer
Aug 28, 2002
107
US
I have a form (Rolodex Database) with a number of checkboxes to indicate category, group, rank, and/or title for each record. There are currently 90 categories a record could belong to (each record may have more than one group, category, rank, and/or title).

I currently have a subform with all the groups on it and it works 'ok'. I'd like to redo the design so the checkboxes don't update when changing focus from the subform to the parent form. Here's my idea for doing that:

I'd like to have a column of 22 checkboxes and 22 labels inside a rectangle (to look like a subform) with a vertical scroll bar on the side. I'd like to read the field names from the underlying table into an array, then show a group of 22 from the array in the 22 checkboxes on the form. Then increment / decrement the value array variables displayed based on the movement of the scrollbar.

[red]Can I read the values of the fieldname(s) into an array?[/red]

I'm also open to other ideas of implementation that would be better than what I am trying to do...

Thanks,
 
It sounds rather tedious. Could you just use a list box or combobox? If so, set the RowSourceType to "Field List" and set the RowSource property to the name of the table or query you want listed.
 
Can I read the values of the fieldname(s) into an array?
Take a look at the fields collection of the TableDef object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Yes, this does sound kinda tedious. But I'm concerned about users unknowingly UNselecting multiple options on a combo box option, and I am not sure I could code the multi values from a combobox or listbox any better than I could do the tedium of the checkboxes displaying a portion of an array.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top