Access 2007 Beta

  • Thread starter Thread starter JamesJ
  • Start date Start date
J

JamesJ

In the Custom Navigation Bar I place my forms and named them with
a name other than the typical naming conventions. For instance: My Dvd
library form I would normally call frmDvd, which wouldn't look very well
in the Navigation Bar so I created a form and called it DVD Video Library.
Problem: How do I reference the form name?
Such as Forms!DVD Video Library.Requery triggers a syntax error or
a expected = error. I need to requery the form when another
popup and modal form closes.

Thanks,
James
 
In almost all cases in Access, when you've got spaces in names, you need to
enclosed the name in square brackets:

Forms![DVD Video Library].Requery

You could also use:

Forms("DVD Video Library").Requery

(For what it's worth, this is true for all versions of Access, not strictly
Access 2007)
 
Hi James,

since your formname has spaces, enclose it in square brackets

Forms![DVD Video Library].Requery

It is a good idea not to use spaces or special characters
(other than underscore) in names -- field, table, control,
etc...

you could name it this
--> DVD_Video_Library
or this --> DVDVideoLibrary


Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
Thanks much.

James

--
----------------------------------------------------
This mailbox protected from unsolicited email by Spam Alarm
from Dignity Software http://www.dignitysoftware.com
Douglas J. Steele said:
In almost all cases in Access, when you've got spaces in names, you need
to enclosed the name in square brackets:

Forms![DVD Video Library].Requery

You could also use:

Forms("DVD Video Library").Requery

(For what it's worth, this is true for all versions of Access, not
strictly Access 2007)

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


JamesJ said:
In the Custom Navigation Bar I place my forms and named them with
a name other than the typical naming conventions. For instance: My Dvd
library form I would normally call frmDvd, which wouldn't look very well
in the Navigation Bar so I created a form and called it DVD Video
Library.
Problem: How do I reference the form name?
Such as Forms!DVD Video Library.Requery triggers a syntax error or
a expected = error. I need to requery the form when another
popup and modal form closes.

Thanks,
James
 
Thanks for the fast reply.

James

--
----------------------------------------------------
This mailbox protected from unsolicited email by Spam Alarm
from Dignity Software http://www.dignitysoftware.com
strive4peace said:
Hi James,

since your formname has spaces, enclose it in square brackets

Forms![DVD Video Library].Requery

It is a good idea not to use spaces or special characters (other than
underscore) in names -- field, table, control, etc...

you could name it this
--> DVD_Video_Library
or this --> DVDVideoLibrary


Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
In the Custom Navigation Bar I place my forms and named them with
a name other than the typical naming conventions. For instance: My Dvd
library form I would normally call frmDvd, which wouldn't look very well
in the Navigation Bar so I created a form and called it DVD Video
Library.
Problem: How do I reference the form name?
Such as Forms!DVD Video Library.Requery triggers a syntax error or
a expected = error. I need to requery the form when another
popup and modal form closes.

Thanks,
James
 
James,

Remember that you can follow your own naming conventions (frmDVD) and then create custom categories
and groups in the Navigation Pane. You can then create shortcuts to these objects in the various
groups and rename them to "friendly" names (DVD Video Library). In this manner your users are
presented with understandable object names and under the covers you are following a naming
convention. The Nav Pane could then be further customized to show only the objects you want users to
work with-forms and reports.

Best of both worlds.
:-)

--
Jeff Conrad
Access Junkie - MVP
http://home.bendbroadband.com/conradsystems/accessjunkie.html
http://www.access.qbuilt.com/html/articles.html

in message:
 
Hi Jeff,

Great point!

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
Back
Top