stupid dialog box

mlh407

Registered User.
Local time
Today, 10:13
Joined
Jun 24, 2005
Messages
26
I have searched the net and am unable to find a way to do this.


I need to have a user click a button on a datasheet form, and a dialog box pop up giving them 3 options

Then some vb code run based on what they press.


Does anyone have any ideas on how to do this?

Mike
 
Unless you are happy (and it is appropriate) to use vbYesNoCancel as your options, you will need to create your own "pop up" form with your option buttons.

You can then set your code to run from the selection on the new pop up form.

Hopefully this will give you a start.
 
Newman said:
A dialog box is nothing more than a form that Microsoft created for us to make things go faster. If the dialog box provided by them does not fill your request, create your own.


How???

I could use a form, to do what I want, but how do I pass the row that the user was on?

R1 f1 f2 f3, button
R2 f1,f2,f3 button
R3 f1,f2,f3 button


If a user presses a button in row 2 how to I pass that to my form, so that when a users hits a button on the form, it knows that the first button that was hit, was row 2

Mike
 
The OnClick of your original button will simply open up your popup form. This will also set that particular record (row) as the current or active record (row).

The procedures of your Three options on the popup form can then reference any required information from the original form, regardless of row number. It simply references the active record in a standard Forms!Original_Frm_Name.Field_Name format.

HTH
 
bradcccs said:
The OnClick of your original button will simply open up your popup form. This will also set that particular record (row) as the current or active record (row).

The procedures of your Three options on the popup form can then reference any required information from the original form, regardless of row number. It simply references the active record in a standard Forms!Original_Frm_Name.Field_Name format.

HTH


Last stupid question then, cause that sounds easy, How do I use the "onclick" to pop open a form?
 
mlh407 said:
Last stupid question then, cause that sounds easy, How do I use the "onclick" to pop open a form?
Code:
DoCmd.OpenForm "YourFormNameHere"
 
mlh407 said:
How???

I could use a form, to do what I want, but how do I pass the row that the user was on?

R1 f1 f2 f3, button
R2 f1,f2,f3 button
R3 f1,f2,f3 button


If a user presses a button in row 2 how to I pass that to my form, so that when a users hits a button on the form, it knows that the first button that was hit, was row 2

Mike
Access does not store or display "rows". You are calling a record a row.
 
subform ?

bradcccs said:
The OnClick of your original button will simply open up your popup form. This will also set that particular record (row) as the current or active record (row).

The procedures of your Three options on the popup form can then reference any required information from the original form, regardless of row number. It simply references the active record in a standard Forms!Original_Frm_Name.Field_Name format.

HTH


Well I am almost there, however, the form that I need to pull is a subfrm of another frm.

Using the code

msgbox(Forms!o_subform.id_number)

Gives me an error of Method item of object forms failed.


Do I need to referance this though the form that it is a subform of.

Thanks for the help
 
example

ghudson said:
I would guess yes you would.
Can you give me an example. I am a long time PHP/perl person, but this is my first time with vb
 
ghudson said:
I would guess yes you would.

he he he, you are a harsh man....


You have to reference the Main Form / Subform_OBJECT / Subform_FIELD in that order

eg:

Forms!Main_Form_Name!Subfrm_ObjectName.FieldName

Note: The Subfrm_ObjectName is the name that you gave the Subform object on the main form. It may or maynot be the same as the actual subform name!


Now that you have received help here, please hang around. There are some people that are often searching for php help. Perhaps you can contribute to the forum by assisting them.

Cheers

Brad.
 

Users who are viewing this thread

Back
Top Bottom