pullmyefinger
Registered User.
- Local time
- Today, 18:56
- Joined
- Feb 26, 2011
- Messages
- 37
I am new to this stuff so pls do your explanation accordingly.
I have an access table called SEQ with fields such as SeqA, SeqB...Seq?, etc.
These are Integer fields that store one sequence number for a particular location (A,B,C...).
I have an optiongroup that asks for the particular location (A,B,C), then I create a concatenated variable to store the Actual Field Name in a Variable, e.g.:
this is pseudocode only
dim loctext, seqvar as string
seqvar="Seq"
fldname=seqvar & loctext ( if loctext="BI" then fldname="SeqBI". THIS WORKS).
I did the ADODB connection crap and that seems to be ok syntax-wise. no errors there.
The PITA part is that after going to The ONLY Record in the SEQ table and
getting the VALUE for the field name SeqBI.
How the heck do I get VB to get the INTERPRET "fldname" as an Actual Field from the SEQ table AND give me the VALUE of the field in the current record?????????????
I read post after post from Dave somebody and Gemma the Dog or something like that, TRIED all of it and none of it worked.
I keep getting run time errors cuz VB can't interpret what I want cuz I don't know how to say it right.
----------Summary---------------------------
let's say that in table SEQ there is a field name called SeqBI (there is), and it's current value in the current (and only) record is 68.
currvalu = SEQ.Fields(fldname).Value (currvalu is Integer)
(this is what needs to work regardless of the field name in the SEQ Table)
then
newvalu = currvalu + 1
("newvalu" is the next sequence number, auto generated via this code)
I Also need to be able to "assign" a piece of equipment that value (SEQBI needs to be 69 for a piece of equipment in Another Table on the form),
After that sequence number is assigned to the equipment, the Value 69 needs to be Written back in the SeqBI field of the current/only record in the SEQ table.
This process will obviously repeat for any piece of equipment at any location.
Hopefully I can get an answer that works!! Thank You
I have an access table called SEQ with fields such as SeqA, SeqB...Seq?, etc.
These are Integer fields that store one sequence number for a particular location (A,B,C...).
I have an optiongroup that asks for the particular location (A,B,C), then I create a concatenated variable to store the Actual Field Name in a Variable, e.g.:
this is pseudocode only
dim loctext, seqvar as string
seqvar="Seq"
fldname=seqvar & loctext ( if loctext="BI" then fldname="SeqBI". THIS WORKS).
I did the ADODB connection crap and that seems to be ok syntax-wise. no errors there.
The PITA part is that after going to The ONLY Record in the SEQ table and
getting the VALUE for the field name SeqBI.
How the heck do I get VB to get the INTERPRET "fldname" as an Actual Field from the SEQ table AND give me the VALUE of the field in the current record?????????????
I read post after post from Dave somebody and Gemma the Dog or something like that, TRIED all of it and none of it worked.
I keep getting run time errors cuz VB can't interpret what I want cuz I don't know how to say it right.
----------Summary---------------------------
let's say that in table SEQ there is a field name called SeqBI (there is), and it's current value in the current (and only) record is 68.
currvalu = SEQ.Fields(fldname).Value (currvalu is Integer)
(this is what needs to work regardless of the field name in the SEQ Table)
then
newvalu = currvalu + 1
("newvalu" is the next sequence number, auto generated via this code)
I Also need to be able to "assign" a piece of equipment that value (SEQBI needs to be 69 for a piece of equipment in Another Table on the form),
After that sequence number is assigned to the equipment, the Value 69 needs to be Written back in the SeqBI field of the current/only record in the SEQ table.
This process will obviously repeat for any piece of equipment at any location.
Hopefully I can get an answer that works!! Thank You