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 2005

Tip: Looking for answers? Try searching our database.

Refer to Table!Field from Code - How ???

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian Kenneally at Proskid Pty Ltd - 18 Jul 2005 05:44 GMT
Environment: Access 2000 .mdb

I have a main form with a couple of subForms. The main forms’ data source is
a table.

tblMyTable

There is a combo box on the main form where the user selects a name from the
Customer table

tblCustomers

What I am trying to do is this……

Using the AfterUpdate event on the combo box I want to check a field on
tblCustomers.

The field I want to check is a Yes/No field and, based on the value found, a
further event may be triggered.

I am having real trouble with this.

The application is in use already so it is too late to make fundamental
changes to its structure.

Any help would be greatly appreciated.

Thanks.
Arvin Meyer [MVP] - 18 Jul 2005 06:01 GMT
You could use DLookup, but it's much easier to add the field to the combo
box's row source, and use that. So:

Select IDField, MyField, MyYesNo From tblCustomers

Sub cboMycombo_AfterUpdate()
   If Me.cboMyCombo.Column(2) = True Then ' Zero based
       ' Do this
   Else
       ' Do that
   End If
End Sub
Signature

Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

> Environment: Access 2000 .mdb
>
> I have a main form with a couple of subForms. The main forms' data source
is
> a table.
>
[quoted text clipped - 21 lines]
>
> Thanks.
 
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.