As stated in my latest reply (substitute response for revised BTW, Brain
and
keyboard malfunction)
It would seem you want to update a "revised" flag on the caller form, not
on
the called form ("booking" )
ie
put the proposed
Me.Revised.Value = True
After the MsgBox has been answered "Ok" on the caller form (datasheet)
but before The other form is opened (if you open the form as a Dialog
form -
it won't be processed before after it's closed
you might also save the record first
strMsg = "Is this a Revised Trip?."
If MsgBox(strMsg, vbYesNo + vbExlcamation, "Incomplete Data") = vbYes
Then '---If yes is still opens form
Me.Revised.Value = True
Me.Dirty = False
Else
' Do Nothing
End If
DoCmd.OpenForm "NameOfForm"
HTH
Pieter
You might also consider updating the Revised Field based on wether
changes
are made or not, instead of "bugging" the users with a question.
Will take more thought to get right, but ...
PS signing of for today
Chey said:
Wow that's sounds like a tough one. So a little history of what I have
going.
You click a command button
This brings you to a list of travelers
They choose there name from the list
It opens a new form with a datasheet off all there trips.
They double click on the date leave of there trip.
This is where it opens the request form. Before this opens I would
like
the
message box to appear. Shoudl I still do what you suggested? If so
where
do
I put the hidden control called responses?
:
Boy, You're active today
One trick
Add a hidden control named Response on the "MainForm" (page header
section
is my favourite, as none of my forms are used for print & you can set
it
to
hidden)
After the MsgBox response, set it's Value to True/False (or Yes/no
<g>)
Accordingly.
For the Default Value of the "Revised" Control on the dependant Form
add:
=Forms!MainForm!Response
Reading more carefully, leaving the above for it's usefullness(?)
Simply :
If ... Then
Me.Revised.Value = True
DoCmd.OpenForm ....
Else
Me.Revised.Value = False Or Nz(Me.Revised.Value,False) ' ie set
False
if new record or allready False, True if was True - purely to expand
on
the
previous post
End If
HTH
Pieter
I have this pieced together message box. Can someone assist me with
the
rest?
Dim strMsg As String
I want this to be on click
strMsg = "Is this a Revised Trip?."
If MsgBox(strMsg, vbYesNo + vbExlcamation, "Incomplete Data")
=
vbYes
Then---If yes is still opens form
Openform
Me.[Revised].SetFocus
if Yes Then I want it to make Revised True- So now it has a check
box
if No just open form
Please help
Thanks
Chey
--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 4388 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 4421 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!