|
-
Oct 30th, 2000, 04:03 PM
#1
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
-
Oct 30th, 2000, 04:05 PM
#2
Monday Morning Lunatic
Try using the field's name:
Code:
RCS_dflt!FieldName = Information
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Oct 30th, 2000, 04:15 PM
#3
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
-
Oct 31st, 2000, 08:40 AM
#4
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
-
Oct 31st, 2000, 08:47 AM
#5
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|