George Too
Registered User.
- Local time
- Today, 16:23
- Joined
- Aug 12, 2002
- Messages
- 198
Would this code work? The part I'm not sure about is
"rst(Field.Name) = control.Value "
'*************************************************
Set rst = dbs.OpenRecordset("tblRepeats", dbOpenDynaset)
Criteria = "Project= '" & Me.txtProject & "'"
rst.FindFirst Criteria
'**** do if no Project was found
If rst.NoMatch Then
rst.AddNew
For Each control In Me.subfrmRepeats.controls
If Not IsNull(control.Value) Then
rst(Field.Name) = control.Value
End If
Next control
rst.Update
rst.Close
dbs.Close
End If
'************************************************
Thanks,
George
"rst(Field.Name) = control.Value "
'*************************************************
Set rst = dbs.OpenRecordset("tblRepeats", dbOpenDynaset)
Criteria = "Project= '" & Me.txtProject & "'"
rst.FindFirst Criteria
'**** do if no Project was found
If rst.NoMatch Then
rst.AddNew
For Each control In Me.subfrmRepeats.controls
If Not IsNull(control.Value) Then
rst(Field.Name) = control.Value
End If
Next control
rst.Update
rst.Close
dbs.Close
End If
'************************************************
Thanks,
George