T
Ted
hi,
i'm using a2k...
i have a form called 'Screening Log' and on it there's an options group
called Frame1 and i've written some vba to use the select case structure. a
portion of it which isn't working yet is below
Private Sub Frame1_AfterUpdate()
Dim Response as Long
Dim Results as Integer
Select Case Frame1.Value
.........
Case 5
Me.OffStudyDate.SetFocus
If myvarOldValue = 1 Or myvarOldValue = 2 Or myvarOldValue =
3 Or myvarOldValue = 4 _
And Not IsNull(OffStudyDate) And Not IsNull(SequenceNum)
Then
DoCmd.Save acForm, "Screening Log (Edit Only)"
DoCmd.RunMacro ("Append Off Study Pxs--Edit Form")
ElseIf myvarOldValue = 6 Or myvarOldValue = 7 And Not
IsNull(OffStudyDate) _
And Not IsNull(SequenceNum) Then
DoCmd.RunMacro ("Delete Off Study Pxs--Edit Form")
DoCmd.RunMacro ("Append Off Study Pxs--Edit Form")
End If
is this NOT the place to put the docmd.runmacro statement. the object it's
using is a macro with a query to append a portion of the current record to
another table.
when i found that it wasn't, i inserted the docmd.save above it on the
assumption that the changes the user makes before clicking the Case 5 option
button needed to be 'saved' to the underlying control source. i'm new at all
this, and so i aren't sure *when* and *where* the changes are applied to the
control source of the form. i figured (after looking at the Help doc'n) the
docmd.save acform would help things, but given it's not working, i guess it's
not based on the fact that the messages appearing on the screen which tell me
how many records are being appended tell me that '0' (ZERO) are getting
appended :-(
any clues to offer?
-ted
i'm using a2k...
i have a form called 'Screening Log' and on it there's an options group
called Frame1 and i've written some vba to use the select case structure. a
portion of it which isn't working yet is below
Private Sub Frame1_AfterUpdate()
Dim Response as Long
Dim Results as Integer
Select Case Frame1.Value
.........
Case 5
Me.OffStudyDate.SetFocus
If myvarOldValue = 1 Or myvarOldValue = 2 Or myvarOldValue =
3 Or myvarOldValue = 4 _
And Not IsNull(OffStudyDate) And Not IsNull(SequenceNum)
Then
DoCmd.Save acForm, "Screening Log (Edit Only)"
DoCmd.RunMacro ("Append Off Study Pxs--Edit Form")
ElseIf myvarOldValue = 6 Or myvarOldValue = 7 And Not
IsNull(OffStudyDate) _
And Not IsNull(SequenceNum) Then
DoCmd.RunMacro ("Delete Off Study Pxs--Edit Form")
DoCmd.RunMacro ("Append Off Study Pxs--Edit Form")
End If
is this NOT the place to put the docmd.runmacro statement. the object it's
using is a macro with a query to append a portion of the current record to
another table.
when i found that it wasn't, i inserted the docmd.save above it on the
assumption that the changes the user makes before clicking the Case 5 option
button needed to be 'saved' to the underlying control source. i'm new at all
this, and so i aren't sure *when* and *where* the changes are applied to the
control source of the form. i figured (after looking at the Help doc'n) the
docmd.save acform would help things, but given it's not working, i guess it's
not based on the fact that the messages appearing on the screen which tell me
how many records are being appended tell me that '0' (ZERO) are getting
appended :-(
any clues to offer?
-ted