A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Finding a Forms Name



 
 
Thread Tools Display Modes
  #1  
Old August 24th, 2004, 07:49 PM
neenmarie
external usenet poster
 
Posts: n/a
Default Finding a Forms Name

Where is the quickest way to find a forms name.
I've looked in the form's properties and find the name of the record source
and the caption, but don't see the form's name there. I can find it by going
into the switchboard menu and finding the name it is calling up, but if there
is a subform on it, I can't find it's name.
Thx Much

  #2  
Old August 24th, 2004, 07:56 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

The form's name is not shown in the properties window.

What/when do you want to do this?

--

Ken Snell
MS ACCESS MVP

"neenmarie" wrote in message
...
Where is the quickest way to find a forms name.
I've looked in the form's properties and find the name of the record

source
and the caption, but don't see the form's name there. I can find it by

going
into the switchboard menu and finding the name it is calling up, but if

there
is a subform on it, I can't find it's name.
Thx Much



  #3  
Old August 24th, 2004, 08:11 PM
neenmarie
external usenet poster
 
Posts: n/a
Default

I'm trying to use setfocus to go to a field on a subform. I need the name of
the parent and the subform, but the code is not working so I think I still
don't have the correct names. This is the code I'm trying to use:

me.parentform.subform.setfocus
me.parentform.subform.form.fieldname.setfocus

But, when I put in what I think the name of the form (either form) is and
hit the "." no options come up - making me think the form name is incorrect.
And, when I try to run the code, it errors.


"Ken Snell [MVP]" wrote:

The form's name is not shown in the properties window.

What/when do you want to do this?

--

Ken Snell
MS ACCESS MVP

"neenmarie" wrote in message
...
Where is the quickest way to find a forms name.
I've looked in the form's properties and find the name of the record

source
and the caption, but don't see the form's name there. I can find it by

going
into the switchboard menu and finding the name it is calling up, but if

there
is a subform on it, I can't find it's name.
Thx Much




  #4  
Old August 24th, 2004, 08:34 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

I assume that you're running this code from the main form's module. As such,
you don't care what the name of the main form is, as it's not needed for
your purpose. You just need the name of the subform control (the control
that is holding the subform) and the control name on the subform form.

Me.SubformName.SetFocus
Me.SubformName!ControlName.SetFocus

Note that a field is not a control. You cannot set focus onto a field, as a
field exists only in the form's recordsource. Controls may be bound to
fields, but controls are what you see on the form.

--

Ken Snell
MS ACCESS MVP

"neenmarie" wrote in message
...
I'm trying to use setfocus to go to a field on a subform. I need the name

of
the parent and the subform, but the code is not working so I think I still
don't have the correct names. This is the code I'm trying to use:

me.parentform.subform.setfocus
me.parentform.subform.form.fieldname.setfocus

But, when I put in what I think the name of the form (either form) is and
hit the "." no options come up - making me think the form name is

incorrect.
And, when I try to run the code, it errors.


"Ken Snell [MVP]" wrote:

The form's name is not shown in the properties window.

What/when do you want to do this?

--

Ken Snell
MS ACCESS MVP

"neenmarie" wrote in message
...
Where is the quickest way to find a forms name.
I've looked in the form's properties and find the name of the record

source
and the caption, but don't see the form's name there. I can find it

by
going
into the switchboard menu and finding the name it is calling up, but

if
there
is a subform on it, I can't find it's name.
Thx Much






  #5  
Old August 24th, 2004, 08:55 PM
neenmarie
external usenet poster
 
Posts: n/a
Default

Thank you.
After moving to the subform and entering data, I will then want to move to
the parent form and set focus on a control there to continue data entry. So,
I think I still need to be able to find the names of the forms somewhere
won't I?
Thx

"Ken Snell [MVP]" wrote:

I assume that you're running this code from the main form's module. As such,
you don't care what the name of the main form is, as it's not needed for
your purpose. You just need the name of the subform control (the control
that is holding the subform) and the control name on the subform form.

Me.SubformName.SetFocus
Me.SubformName!ControlName.SetFocus

Note that a field is not a control. You cannot set focus onto a field, as a
field exists only in the form's recordsource. Controls may be bound to
fields, but controls are what you see on the form.

--

Ken Snell
MS ACCESS MVP

"neenmarie" wrote in message
...
I'm trying to use setfocus to go to a field on a subform. I need the name

of
the parent and the subform, but the code is not working so I think I still
don't have the correct names. This is the code I'm trying to use:

me.parentform.subform.setfocus
me.parentform.subform.form.fieldname.setfocus

But, when I put in what I think the name of the form (either form) is and
hit the "." no options come up - making me think the form name is

incorrect.
And, when I try to run the code, it errors.


"Ken Snell [MVP]" wrote:

The form's name is not shown in the properties window.

What/when do you want to do this?

--

Ken Snell
MS ACCESS MVP

"neenmarie" wrote in message
...
Where is the quickest way to find a forms name.
I've looked in the form's properties and find the name of the record
source
and the caption, but don't see the form's name there. I can find it

by
going
into the switchboard menu and finding the name it is calling up, but

if
there
is a subform on it, I can't find it's name.
Thx Much







  #6  
Old August 24th, 2004, 09:06 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

No, in that case you just use this:

Me.Parent.ControlNameOnMainForm.SetFocus


--

Ken Snell
MS ACCESS MVP

"neenmarie" wrote in message
...
Thank you.
After moving to the subform and entering data, I will then want to move to
the parent form and set focus on a control there to continue data entry.

So,
I think I still need to be able to find the names of the forms somewhere
won't I?
Thx

"Ken Snell [MVP]" wrote:

I assume that you're running this code from the main form's module. As

such,
you don't care what the name of the main form is, as it's not needed for
your purpose. You just need the name of the subform control (the control
that is holding the subform) and the control name on the subform form.

Me.SubformName.SetFocus
Me.SubformName!ControlName.SetFocus

Note that a field is not a control. You cannot set focus onto a field,

as a
field exists only in the form's recordsource. Controls may be bound to
fields, but controls are what you see on the form.

--

Ken Snell
MS ACCESS MVP

"neenmarie" wrote in message
...
I'm trying to use setfocus to go to a field on a subform. I need the

name
of
the parent and the subform, but the code is not working so I think I

still
don't have the correct names. This is the code I'm trying to use:

me.parentform.subform.setfocus
me.parentform.subform.form.fieldname.setfocus

But, when I put in what I think the name of the form (either form) is

and
hit the "." no options come up - making me think the form name is

incorrect.
And, when I try to run the code, it errors.


"Ken Snell [MVP]" wrote:

The form's name is not shown in the properties window.

What/when do you want to do this?

--

Ken Snell
MS ACCESS MVP

"neenmarie" wrote in message
...
Where is the quickest way to find a forms name.
I've looked in the form's properties and find the name of the

record
source
and the caption, but don't see the form's name there. I can find

it
by
going
into the switchboard menu and finding the name it is calling up,

but
if
there
is a subform on it, I can't find it's name.
Thx Much









  #7  
Old August 24th, 2004, 09:27 PM
neenmarie
external usenet poster
 
Posts: n/a
Default

Thank you so much for your help

"Ken Snell [MVP]" wrote:

No, in that case you just use this:

Me.Parent.ControlNameOnMainForm.SetFocus


--

Ken Snell
MS ACCESS MVP

"neenmarie" wrote in message
...
Thank you.
After moving to the subform and entering data, I will then want to move to
the parent form and set focus on a control there to continue data entry.

So,
I think I still need to be able to find the names of the forms somewhere
won't I?
Thx

"Ken Snell [MVP]" wrote:

I assume that you're running this code from the main form's module. As

such,
you don't care what the name of the main form is, as it's not needed for
your purpose. You just need the name of the subform control (the control
that is holding the subform) and the control name on the subform form.

Me.SubformName.SetFocus
Me.SubformName!ControlName.SetFocus

Note that a field is not a control. You cannot set focus onto a field,

as a
field exists only in the form's recordsource. Controls may be bound to
fields, but controls are what you see on the form.

--

Ken Snell
MS ACCESS MVP

"neenmarie" wrote in message
...
I'm trying to use setfocus to go to a field on a subform. I need the

name
of
the parent and the subform, but the code is not working so I think I

still
don't have the correct names. This is the code I'm trying to use:

me.parentform.subform.setfocus
me.parentform.subform.form.fieldname.setfocus

But, when I put in what I think the name of the form (either form) is

and
hit the "." no options come up - making me think the form name is
incorrect.
And, when I try to run the code, it errors.


"Ken Snell [MVP]" wrote:

The form's name is not shown in the properties window.

What/when do you want to do this?

--

Ken Snell
MS ACCESS MVP

"neenmarie" wrote in message
...
Where is the quickest way to find a forms name.
I've looked in the form's properties and find the name of the

record
source
and the caption, but don't see the form's name there. I can find

it
by
going
into the switchboard menu and finding the name it is calling up,

but
if
there
is a subform on it, I can't find it's name.
Thx Much










 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
forms in Outlook 2003 Marty Leaf General Discussion 1 August 18th, 2004 06:13 PM
FindRecord - Finding records between forms? Solus Using Forms 1 August 10th, 2004 11:23 PM
datasheet forms open in form mode from the Switchboard Paul James Using Forms 5 July 13th, 2004 06:51 AM
Word Forms? CEVisker New Users 4 June 21st, 2004 01:25 AM
Forms Check Box not working DLLower General Discussion 2 June 17th, 2004 09:34 PM


All times are GMT +1. The time now is 08:36 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.