Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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

Chey said:
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
 
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?

Pieter Wijnen said:
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

Chey said:
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!
 
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?

Pieter Wijnen said:
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

Chey said:
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 tired this
Private Sub Date_Leave_Click()
strMsg = "Is this a Revised Trip?."
If MsgBox(strMsg, vbYesNo + vbExlcamation, "Incomplete Data") = vbYes Then
Else
End If
DoCmd.OpenForm "Trave Request for Look up", , , [TA Number] =
[Forms]![Look Up Request Forms]![Find Request].[Form]![TA Number]
End Sub

When I put this in-
Me.Revised.Value = True
Me.Dirty = False

It highlights .Revised
and says method or data type not recongized.
I copied and pasted the Revised from the form.



Pieter Wijnen said:
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?

Pieter Wijnen said:
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!
 
I put the revised checkbox on the form where I click on the field then it
runs the code. However it keeps stoping at .Revised.

Any suggestions?

Pieter Wijnen said:
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?

Pieter Wijnen said:
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!
 
Okay well now it kind of got it to work. The message box pops up, I click
yes and my form opens but does not check the revised/response box. I renamed
it to Response. Now what?

Pieter Wijnen said:
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?

Pieter Wijnen said:
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!
 
"Revised" must be exchanged for the name of the control you want to be
checked (set to true/yes/-1)

(Un) fortunately I'm not clairvoyant <g>

Hope this clarifies

--
Pieter Wijnen

My feeble Access pages (good links though)
http://www.thuleeng.com/access
When all else fail try:
http://www.mvps.org/access
http://www.granite.ab.ca/
http://allenbrowne.com/
http://www.lebans.com/




Chey said:
I tired this
Private Sub Date_Leave_Click()
strMsg = "Is this a Revised Trip?."
If MsgBox(strMsg, vbYesNo + vbExlcamation, "Incomplete Data") = vbYes
Then
Else
End If
DoCmd.OpenForm "Trave Request for Look up", , , [TA Number] =
[Forms]![Look Up Request Forms]![Find Request].[Form]![TA Number]
End Sub

When I put this in-
Me.Revised.Value = True
Me.Dirty = False

It highlights .Revised
and says method or data type not recongized.
I copied and pasted the Revised from the form.



Pieter Wijnen said:
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!
 
aha, the Checkbox the Form to be opened! Note I've changed the name to
Response too

(You can make the Response CheckBox on the MainForm Hidden - Visible = No)

strMsg = "Is this a Revised Trip?."
If MsgBox(strMsg, vbYesNo + vbExlcamation, "Incomplete Data") = vbYes
Then '---If yes is still opens form
Me.Response.Value = True
Me.Dirty = False
Else
Me.Response.Value = False
' Do Nothing
End If
DoCmd.OpenForm "NameOfForm" .......
Forms!NameOfForm.Response.Value = Me.Response.Value '***

'*** Or you can put in the Default Value for "Response" on "NameOfForm":
= Forms!MainForm!Response (if it's a blank record)

'*** Or in the Form_Current Event of the "NameOfForm":
Me.Response.Value = Forms!MainForm!Response

As you're aware, several ways to make an omelette, but you have to break
some eggs
Do look around in the webpages listed below to learn a lot more on how to
control Access
I made mine this (technically yesterday) morning (CET) - will flesh it out
in time
--
Pieter Wijnen

My feeble Access pages (good links though)
http://www.thuleeng.com/access
When all else fail try:
http://www.mvps.org/access
http://www.granite.ab.ca/
http://allenbrowne.com/
http://www.lebans.com/




Chey said:
Okay well now it kind of got it to work. The message box pops up, I click
yes and my form opens but does not check the revised/response box. I
renamed
it to Response. Now what?

Pieter Wijnen said:
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!
 
Back
Top