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. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|