Recordset Name substitution

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have hardcode the following statement to use the CardNumber field in a
table to fill a record set variable, rstBundle!start =
rstInput!CardNumber.

I need to improve the app by allowing the user to choose which database
field to use to fill the recordset. I have tried using a string variable of
strField to represent the column but the program blows up.

Here is the incorrect code:
dim strField as string
strField = combobox.value
rstBundle!start = rstInput!strField

How do I correctly code the statement.

Thanks in advance for any help.

Dan
 
Dan said:
I have hardcode the following statement to use the CardNumber field in a
table to fill a record set variable, rstBundle!start =
rstInput!CardNumber.

I need to improve the app by allowing the user to choose which database
field to use to fill the recordset. I have tried using a string variable of
strField to represent the column but the program blows up.

Here is the incorrect code:
dim strField as string
strField = combobox.value
rstBundle!start = rstInput!strField

How do I correctly code the statement.


stBundle!start = rstInput(strField)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top