Field Value AND Field Description Property
Field Value AND Field Description Property
(OP)
I am trying to update one table with data from another as well as a field property value (description)...
It like I can almost get it to work...!! Ha..!!
Just not setting up the references to the table the right way I guess...
Below is what I am working with...
Any suggestions or examples would be greatly appreciated..!!!
Thanks in advance..!!
air1access
rs1.MoveFirst
Do While Not rs1.EOF
For i = 1 To FieldCount - 1
If Not IsNull(rs1("Value" & i)) Then
rs2.AddNew
rs2!IID = rs1!IID
rs2!Value = rs1("Value" & i)
Set tbl = db.TableDefs(rs1)
Set fld = tbl.Fields
Set prp = rs1.Properties("description")
rs2!Ck_Type = prp.Value
rs2.Update
End If
Next i
rs1.MoveNext
Loop
It like I can almost get it to work...!! Ha..!!
Just not setting up the references to the table the right way I guess...
Below is what I am working with...
Any suggestions or examples would be greatly appreciated..!!!
Thanks in advance..!!
air1access
rs1.MoveFirst
Do While Not rs1.EOF
For i = 1 To FieldCount - 1
If Not IsNull(rs1("Value" & i)) Then
rs2.AddNew
rs2!IID = rs1!IID
rs2!Value = rs1("Value" & i)
Set tbl = db.TableDefs(rs1)
Set fld = tbl.Fields
Set prp = rs1.Properties("description")
rs2!Ck_Type = prp.Value
rs2.Update
End If
Next i
rs1.MoveNext
Loop
RE: Field Value AND Field Description Property
Duane
Hook'D on Access
MS Access MVP
RE: Field Value AND Field Description Property
RE: Field Value AND Field Description Property
Then you state:
If the field description hasn't been set/created in the design interface or in code it will not exist and will generate an error if you attempt to reference it.
Duane
Hook'D on Access
MS Access MVP
RE: Field Value AND Field Description Property
Set tbl = db.TableDefs(rs1)
Hope This Helps, PH.
FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions?
FAQ181-2886: How can I maximize my chances of getting an answer?
RE: Field Value AND Field Description Property
Agreed. It would help to see all the declarations etc.
Duane
Hook'D on Access
MS Access MVP
RE: Field Value AND Field Description Property
Sorry about this.. After all that - I was just told that the data I'm building is no longer needed... Next project..!!
Thanks for the help fellas..!!!