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

use a variable to form a field name

Status
Not open for further replies.

bkkbkk83

Technical User
Jun 11, 2003
7
US
Hi--

I currently have a For loop in my VB program that uses records from a table to create search strings. The program then parses a HTML document to find this search string and pulls out some data. I'd then like to save this data in a field by the same name as the search string in another table.

So, for example, let's say the data in my search string table is (a, b, c, d). My program will search for a in the document and extract a number after it. Then I'd like it to save it to a field somethling like recordset!a.

How can I do this using a loop that runs through each search string individually and then moves onto the next one? It doesn't seem like I can set a variable and then use it as a field name...I don't think something like recorset!SearchString would work where SearchString is a variable set to a or b or c.

Any suggestions? Thanks for your help!

Ben
 
Set the strings up as a string array and loop thru the array.


Rollie E
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top