A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

pop-up that asks a question



 
 
Thread Tools Display Modes
  #1  
Old April 27th, 2010, 06:04 PM posted to microsoft.public.access.forms
natfish
external usenet poster
 
Posts: 7
Default pop-up that asks a question

I would like to create pop-ups that respond to options that are chosen. For
example, I have a form with a drop down for yes/no. If the answer is yes I
want to be able give the user as option to chose whether radiation was
completed or not. I know how to connect the main form to a subform and have
the subform pop up, but I don't want the whole subform to pop-up -- only one
option.

Thanks

  #2  
Old April 27th, 2010, 06:15 PM posted to microsoft.public.access.forms
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default pop-up that asks a question

Try using a message box function with the question read from the subform.
You can build a popup the same way. In the text box of the popup that holds
the option question, use something like the following:

=Forms!FirstFormName!SubformControlName.Form!Optio nQuestionTextBoxName
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"natfish" wrote in message
...
I would like to create pop-ups that respond to options that are chosen. For
example, I have a form with a drop down for yes/no. If the answer is yes I
want to be able give the user as option to chose whether radiation was
completed or not. I know how to connect the main form to a subform and
have
the subform pop up, but I don't want the whole subform to pop-up -- only
one
option.

Thanks



  #3  
Old April 27th, 2010, 06:23 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default pop-up that asks a question

Natfish -

Will a message box do what you want? Look up msgbox if you only need to ask
yes/no questions. You can set the title, the message, and which buttons
(within those available) are on the dialog box. You can then take the
response to populate your data. This is a sample, but use whatever parts you
need.

If MsgBox("Was the radiation completed?", vbYesNo, "Radiation Status") =
vbYes Then
'do what you want to update database to say radiation was completed
End If


--
Daryl S


"natfish" wrote:

I would like to create pop-ups that respond to options that are chosen. For
example, I have a form with a drop down for yes/no. If the answer is yes I
want to be able give the user as option to chose whether radiation was
completed or not. I know how to connect the main form to a subform and have
the subform pop up, but I don't want the whole subform to pop-up -- only one
option.

Thanks

  #4  
Old April 27th, 2010, 08:48 PM posted to microsoft.public.access.forms
natfish
external usenet poster
 
Posts: 7
Default pop-up that asks a question

Can I put this in afterupdate? when I did it gave me a compile: syntax error.

"Daryl S" wrote:

Natfish -

Will a message box do what you want? Look up msgbox if you only need to ask
yes/no questions. You can set the title, the message, and which buttons
(within those available) are on the dialog box. You can then take the
response to populate your data. This is a sample, but use whatever parts you
need.

If MsgBox("Was the radiation completed?", vbYesNo, "Radiation Status") =
vbYes Then
'do what you want to update database to say radiation was completed
End If


--
Daryl S


"natfish" wrote:

I would like to create pop-ups that respond to options that are chosen. For
example, I have a form with a drop down for yes/no. If the answer is yes I
want to be able give the user as option to chose whether radiation was
completed or not. I know how to connect the main form to a subform and have
the subform pop up, but I don't want the whole subform to pop-up -- only one
option.

Thanks

  #5  
Old April 28th, 2010, 02:23 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default pop-up that asks a question

Yes, you can put it there. Post your code if you need help with the syntax.
Remember that in posting, line breaks are added. The "vbYes Then" should be
at the end of the first line, not on a separate line.

--
Daryl S


"natfish" wrote:

Can I put this in afterupdate? when I did it gave me a compile: syntax error.

"Daryl S" wrote:

Natfish -

Will a message box do what you want? Look up msgbox if you only need to ask
yes/no questions. You can set the title, the message, and which buttons
(within those available) are on the dialog box. You can then take the
response to populate your data. This is a sample, but use whatever parts you
need.

If MsgBox("Was the radiation completed?", vbYesNo, "Radiation Status") =
vbYes Then
'do what you want to update database to say radiation was completed
End If


--
Daryl S


"natfish" wrote:

I would like to create pop-ups that respond to options that are chosen. For
example, I have a form with a drop down for yes/no. If the answer is yes I
want to be able give the user as option to chose whether radiation was
completed or not. I know how to connect the main form to a subform and have
the subform pop up, but I don't want the whole subform to pop-up -- only one
option.

Thanks

  #6  
Old April 28th, 2010, 03:48 PM posted to microsoft.public.access.forms
natfish
external usenet poster
 
Posts: 7
Default pop-up that asks a question

Ok that worked, but how do I get it into a table or form so that I can track
it?

"Daryl S" wrote:

Natfish -

Will a message box do what you want? Look up msgbox if you only need to ask
yes/no questions. You can set the title, the message, and which buttons
(within those available) are on the dialog box. You can then take the
response to populate your data. This is a sample, but use whatever parts you
need.

If MsgBox("Was the radiation completed?", vbYesNo, "Radiation Status") =
vbYes Then
'do what you want to update database to say radiation was completed
End If


--
Daryl S


"natfish" wrote:

I would like to create pop-ups that respond to options that are chosen. For
example, I have a form with a drop down for yes/no. If the answer is yes I
want to be able give the user as option to chose whether radiation was
completed or not. I know how to connect the main form to a subform and have
the subform pop up, but I don't want the whole subform to pop-up -- only one
option.

Thanks

  #7  
Old April 28th, 2010, 05:37 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default pop-up that asks a question

Natfish -

You must put this into a table (a form doesn't store data).

It sounds like you don't have a table with the fields you need yet. You
must decide if the new information you are gathering should belong in the
table behind your current form or not. Since you didn't explain your
business, I can't help with that decision. If you decide this new
information belongs with the current information, then you can add fields to
your existing table. In that case, you can add the new field to the form.
If you don't want the user to see this new field (as it won't apply in many
cases), then you can keep it invisible. You would then just set the the
value equal to the results of the msgbox, like this (if RadiationCompleted is
the name of the new control for the new field in the table):

Me.RadiationCompleted = MsgBox("Was the radiation completed?", vbYesNo,
"Radiation Status")

If this won't work, then please explain your business model and where you
think the data should be stored.

--
Daryl S


"natfish" wrote:

Ok that worked, but how do I get it into a table or form so that I can track
it?

"Daryl S" wrote:

Natfish -

Will a message box do what you want? Look up msgbox if you only need to ask
yes/no questions. You can set the title, the message, and which buttons
(within those available) are on the dialog box. You can then take the
response to populate your data. This is a sample, but use whatever parts you
need.

If MsgBox("Was the radiation completed?", vbYesNo, "Radiation Status") =
vbYes Then
'do what you want to update database to say radiation was completed
End If


--
Daryl S


"natfish" wrote:

I would like to create pop-ups that respond to options that are chosen. For
example, I have a form with a drop down for yes/no. If the answer is yes I
want to be able give the user as option to chose whether radiation was
completed or not. I know how to connect the main form to a subform and have
the subform pop up, but I don't want the whole subform to pop-up -- only one
option.

Thanks

  #8  
Old April 28th, 2010, 05:58 PM posted to microsoft.public.access.forms
natfish
external usenet poster
 
Posts: 7
Default pop-up that asks a question

I have created a database for a medical oncologist. I already have a subform
and table with the information in it -- it is called "case summary". I just
wanted to try to make the form user friendly without adding a new field to
the form.

"Daryl S" wrote:

Natfish -

You must put this into a table (a form doesn't store data).

It sounds like you don't have a table with the fields you need yet. You
must decide if the new information you are gathering should belong in the
table behind your current form or not. Since you didn't explain your
business, I can't help with that decision. If you decide this new
information belongs with the current information, then you can add fields to
your existing table. In that case, you can add the new field to the form.
If you don't want the user to see this new field (as it won't apply in many
cases), then you can keep it invisible. You would then just set the the
value equal to the results of the msgbox, like this (if RadiationCompleted is
the name of the new control for the new field in the table):

Me.RadiationCompleted = MsgBox("Was the radiation completed?", vbYesNo,
"Radiation Status")

If this won't work, then please explain your business model and where you
think the data should be stored.

--
Daryl S


"natfish" wrote:

Ok that worked, but how do I get it into a table or form so that I can track
it?

"Daryl S" wrote:

Natfish -

Will a message box do what you want? Look up msgbox if you only need to ask
yes/no questions. You can set the title, the message, and which buttons
(within those available) are on the dialog box. You can then take the
response to populate your data. This is a sample, but use whatever parts you
need.

If MsgBox("Was the radiation completed?", vbYesNo, "Radiation Status") =
vbYes Then
'do what you want to update database to say radiation was completed
End If


--
Daryl S


"natfish" wrote:

I would like to create pop-ups that respond to options that are chosen. For
example, I have a form with a drop down for yes/no. If the answer is yes I
want to be able give the user as option to chose whether radiation was
completed or not. I know how to connect the main form to a subform and have
the subform pop up, but I don't want the whole subform to pop-up -- only one
option.

Thanks

  #9  
Old April 28th, 2010, 06:51 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default pop-up that asks a question

On Wed, 28 Apr 2010 09:58:08 -0700, natfish
wrote:

I have created a database for a medical oncologist. I already have a subform
and table with the information in it -- it is called "case summary". I just
wanted to try to make the form user friendly without adding a new field to
the form.


I do hope you're aware of, and in compliance, with the (rather stringent and
demanding) HIPAA patient medical information laws. Many have argued that
Access databases are inherently not secure enough to comply with those laws.

--

John W. Vinson [MVP]
  #10  
Old April 28th, 2010, 08:08 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default pop-up that asks a question

That means my last posting should work for you, right? Add the field (make
it invisible), and then update it with the results of the msgbox.

--
Daryl S


"natfish" wrote:

I have created a database for a medical oncologist. I already have a subform
and table with the information in it -- it is called "case summary". I just
wanted to try to make the form user friendly without adding a new field to
the form.

"Daryl S" wrote:

Natfish -

You must put this into a table (a form doesn't store data).

It sounds like you don't have a table with the fields you need yet. You
must decide if the new information you are gathering should belong in the
table behind your current form or not. Since you didn't explain your
business, I can't help with that decision. If you decide this new
information belongs with the current information, then you can add fields to
your existing table. In that case, you can add the new field to the form.
If you don't want the user to see this new field (as it won't apply in many
cases), then you can keep it invisible. You would then just set the the
value equal to the results of the msgbox, like this (if RadiationCompleted is
the name of the new control for the new field in the table):

Me.RadiationCompleted = MsgBox("Was the radiation completed?", vbYesNo,
"Radiation Status")

If this won't work, then please explain your business model and where you
think the data should be stored.

--
Daryl S


"natfish" wrote:

Ok that worked, but how do I get it into a table or form so that I can track
it?

"Daryl S" wrote:

Natfish -

Will a message box do what you want? Look up msgbox if you only need to ask
yes/no questions. You can set the title, the message, and which buttons
(within those available) are on the dialog box. You can then take the
response to populate your data. This is a sample, but use whatever parts you
need.

If MsgBox("Was the radiation completed?", vbYesNo, "Radiation Status") =
vbYes Then
'do what you want to update database to say radiation was completed
End If


--
Daryl S


"natfish" wrote:

I would like to create pop-ups that respond to options that are chosen. For
example, I have a form with a drop down for yes/no. If the answer is yes I
want to be able give the user as option to chose whether radiation was
completed or not. I know how to connect the main form to a subform and have
the subform pop up, but I don't want the whole subform to pop-up -- only one
option.

Thanks

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.