Ok, I give. I'm stupid. I'm dumber than squirels. I do
what voices tell me to.
What's wrong with this statement:
RCS_dflt.Fields(0).Value = Information
(RCS_Dflt IS an updateable recordset, The field IS string,
Information IS string)
DerFarm
Printable View
Ok, I give. I'm stupid. I'm dumber than squirels. I do
what voices tell me to.
What's wrong with this statement:
RCS_dflt.Fields(0).Value = Information
(RCS_Dflt IS an updateable recordset, The field IS string,
Information IS string)
DerFarm
Try using the field's name:
Code:RCS_dflt!FieldName = Information
Thanks, Parksie, but it didn't work. I must be asking the
wrong question, or I didn't include all the necessary
information.
[/code]
Check_for_Default_Value:
Set RCS_dflt = DB_Dflt.OpenRecordset(TBL_Name)
If RCS_Dflt.EOF = True Or RCS_dflt.BOF = True Then
RCS_Dflt.AddNew
RCS_Dflt.Update
GoTo Check_for_Default_Value
Else
RCS_Dflt.MoveFirst
RCS_Dflt!DefaultValue = Information
End If
[/code]
What the above is SUPPOSED to do is check to see if RCS_Dflt
has any records, add a blank if none, then repeat the
process changing DefaultValue to Information.
The first part is happening. I can go into the database
and there is a table TBL_Name, with one blank record. When
it hits
[/code]
RCS_Dflt!DefaultValue = Information
[/code]
however, it jumps to the exit marker (I have an On error....)
Does this make more sense?
DerFarm
RobIII --
Yes, Virginia, there IS a goto.....for now. I will replace
it with a different construct after the it is working
properly. Goto's are allowable, but ONLY as a method of
leaving the module.
One entry:One Exit
DerFarm
Here is the code....sans goto...and working. Thank you BruceG.
[/code]
If RCS_Dflt.EOF = True Or RCS_Dflt.BOF = True Then
RCS_Dflt.AddNew
RCS_Dflt.Update
End If
RCS_Dflt.MoveFirst
RCS_Dflt.Edit
RCS_Dflt!DefaultValue.Value = Information
RCS_Dflt.Update
[/code]
DerFarm