Hi, thanks in advance.
on the form I have created I am useing a mdb table to store the field names that I want to populate.
To populate the fields I have to connect to a PLC. this is no problem. what Is the problem is I have about 50 fields that I want to populate from the PLC
I want to take the routine and streamline the operation.
so I put the names in the table and now want to loop through each filed populating the form.
my problem is how do I use the table name as the text box name on the form?
I open the recordset in another sub
Do Until rs_tabs.EOF
str_text = "txt_" & rs_tabs.Fields("t_vb_Tag")
str_global = "g_" & rs_tabs.Fields("t_vb_Tag")
str_text.LinkTimeOut = LinkTimeOut
str_text.LinkTopic = CurrentLinkTopic
str_text.LinkItem = str_global
rs_tabs.MoveNext
loop
when I run the program the str_text is what I want the value of it is txt_BenderStatus now I want to relate this to the form. where I have a field called txt_benderStatus.
when I run this I get the error Invalid qualifier.
Any suggestions?
Thanks again
Jim
on the form I have created I am useing a mdb table to store the field names that I want to populate.
To populate the fields I have to connect to a PLC. this is no problem. what Is the problem is I have about 50 fields that I want to populate from the PLC
I want to take the routine and streamline the operation.
so I put the names in the table and now want to loop through each filed populating the form.
my problem is how do I use the table name as the text box name on the form?
I open the recordset in another sub
Do Until rs_tabs.EOF
str_text = "txt_" & rs_tabs.Fields("t_vb_Tag")
str_global = "g_" & rs_tabs.Fields("t_vb_Tag")
str_text.LinkTimeOut = LinkTimeOut
str_text.LinkTopic = CurrentLinkTopic
str_text.LinkItem = str_global
rs_tabs.MoveNext
loop
when I run the program the str_text is what I want the value of it is txt_BenderStatus now I want to relate this to the form. where I have a field called txt_benderStatus.
when I run this I get the error Invalid qualifier.
Any suggestions?
Thanks again
Jim