Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FormName Problem

Status
Not open for further replies.

Jengo

Programmer
Apr 17, 2000
100
US
In the code of a form you can use the following code to retrieve the form name.

temp = Me.FormName

Well, I have this function (seen below), and I can't retrieve the form name, and I was wondering why this is not working?

Public Sub Close_Form(frm As Form)

DoCmd.Close acForm, frm.FormName

End Sub

**Please remember that this is not the real entire function, I just took this line out.

Thanx in advance for any help that can be given.
 
Try sending just a variable with the form name. and putting a message box at the top to see what is being sent

Public Sub Close_Form(name As String)
msgbox "form Sent = " &
DoCmd.Close acForm, name

End Sub

IF you have other stuff inside of this sub that you are doing write a separate sub and make a call to it.

Walt III
SAElukewl@netscape.net
 
I know you can do it that way, but I wanted to make it more effective, by only having to call the:

frm as form

instead of having to call that and a string with the form name in it.
 
I though the form name was the same as the form caption.
Can you not just use me.caption to retrieve the name of the form?

Eradic8or
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top