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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referencing Form Text Boxes 1

Status
Not open for further replies.

Russie

Programmer
Dec 24, 2000
104
US
Hi.

I have a list of text boxes with similar names:

txtAvalue
txtBvalue
txtCvalue

I'm using code to run queries and perform calculations.

Currently I have to refer to the form text boxes as:

[Forms]![frmtest].txtAValue.value = x
[Forms]![frmtest].txtBValue.value = y

What I want to do is to refer to them using a regional variable:

i.e. variable 'strReg' indicates region...so.

[Forms]![frmtest].txt & (strReg) & Value.value = x

could fit all text boxes depending on strReg's value.

Question:

How can I insert a string variable into a form reference?

A star for a workable answer.

Thanks for anything.

Russie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top