re: "I hate Microsofts dialog boxes - ABORT, RETRY, OR CANCEL!! Help me write my own

homer2002

Registered User.
Local time
Today, 12:23
Joined
Aug 27, 2002
Messages
152
re: "I hate Microsofts dialog boxes - ABORT, RETRY, OR CANCEL!! Help me write my own

Can I simply pass a string as a parameter to a form.
You see Microsoft obviously still havent realised that their dialog boxes look ....... (fill in own insult here)


So i'm going to design my own.

I just want to make a nice little template for my dialog boxes and
then open it using something like


Myownprettydialogbox "I love my dialog box"


to pass the parameter to a form.
(ok i know i need to make a little "docmd.openform nameofform" function)
can someone just give me a sample of code on how to pass/recieve the string

thanks
 
Open form where...

Homer,

The way that I have done this in the past is to tell the new form to open up with the parameter set as the where condition. I have done this successfully with a macro...using the OpenForm action and setting the Where condition to:

mainform.textbox = myform.textbox

this may seem a little cryptic...but if you use the macro and take a look at the OpenForm action it may be clearer.

Bonne chance,
 
Last edited:
You can also pass information to a form using "openargs".

For example,

docmd.OpenForm "myForm",acDialog,,,,,"My sample Text"

And then when you open the form:

Code:
Private Sub Form_Open(Cancel As Integer)
   [I]If openargs <> "" then
        txtMyTextBox = openargs
   end if[/I]
End Sub

Dave
 

Users who are viewing this thread

Back
Top Bottom