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

homer2002

Registered User.
Local time
Today, 06:19
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 like s**T.


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
 

BLeslie88

B Leslie
Local time
Today, 06:19
Joined
May 9, 2002
Messages
228
This what you want...?

Sub cmdOpenForm()
VReply = InputBox("Enter your string here?", "I love my dialog box.")
If NOT(VReply = "") Then
DoCmd.Close
Open_form(VReply)
Else
MsgBox "You must enter Value", vbOKOnly, "Input Error"
Exit Sub
End If
End Sub

Function Open_form(VReply As String)
On Error GoTo Err_Open_form

Dim stDocName As String
Dim stLinkCriteria As String
stDocName = VReply
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Open_form:
Exit Function

Err_Open_form:
MsgBox Err.Description
Resume Exit_Open_form

End Function

Hope this helps...?
 

Users who are viewing this thread

Top Bottom