Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2007

Tip: Looking for answers? Try searching our database.

How to reference fields/objects on a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rich - 24 Jul 2007 17:08 GMT
Hello,

Can anyone help me understand how to reference the fields/objects on a form
when querying/updating database tables?

Example: Form name = "frm_Cont_master"
1.  SSN  (text box)
2.  First name   (text box)
3.  Last Name   (text box)
4.  Company  (Assume this is a combo box selecting Company name and/or
Company ID number from a seperate lookup table).
5.  Department (Assume this is combo box selecting department name/number
from 2nd lookup table, based on the value in #4 above).    Assume Company ABC
has departments 1-5 and Company XYZ has departments 6-9.  Selecting ABC in #4
will yield a list with departments 1-5.

Assume the form name is frm_Cont_master.  Each field on the form will be
stored in 1 or more tables.

I will be performing updates so I do I refer to each object on the form so I
can format the SQL update statement?

Thanks in advance,
Klatuu - 24 Jul 2007 17:14 GMT
To reference the form objects in a query it is:
[Forms]![NameOfForm]![NameOfControl]

Now, based on your post, I highly suspect your database design.
Why are you updating multiple tables with the same control (Not Field,
fields are in tables and queries, controls are on forms)?  This violates
database normalization rules.
Why are you not using bound forms?

I really think you need to reconsider your design.
Signature

Dave Hargis, Microsoft Access MVP

> Hello,
>
[quoted text clipped - 19 lines]
>
> Thanks in advance,
Dale Fye - 24 Jul 2007 17:18 GMT
Rich,

I assume you are trying to create a filter system that allows you to enter
values in one or more of these controls which will then filter your
recordset.  Is that accurate?

If so, check out Allen Browne's site (I think this is the right URL:
http://allenbrowne.com/ser-62.html)

HTH
Dale
Signature

Email address is not valid.
Please reply to newsgroup only.

> Hello,
>
[quoted text clipped - 19 lines]
>
> Thanks in advance,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.