Sabtu, 01 Desember 2012

Re: [MS_AccessPros] Referencing control on subform to requery

 

Dear rodbevill- (name?)

Assuming you'll be running Requery in code behind the outer form (perhaps
in the Current event), you would reference the controls on the subforms
like this:

Me.Subformcontrolname.Form!NameOfControl

Note that Subformcontrolname is the name of the subform control, NOT the
name of the form inside the control - though they are often the same.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: rodbevill <desertscroller@cox.net>
Reply-To: <MS_Access_Professionals@yahoogroups.com>
Date: Saturday, December 1, 2012 5:25 AM
To: <MS_Access_Professionals@yahoogroups.com>
Subject: [MS_AccessPros] Referencing control on subform to requery

The db that I am developing (Access 2010 on Windows 7) consist of a main
form with a tabcontrol. Each tab consist of a split form. Within the
split form are combo-boxes with data based on a saved query. The issue
is requerying the row source for the various combo-boxes when the record
on the main form changes. Each of the tabs contain different data from
the db tables. Each tab only uses one table. Each tab is linked to the
main form thru an id field.
Query definition for the combo-box row source:
SELECT tblParcel.lngParcelID, tblParcel.lngParcelNum
FROM tblParcel
WHERE (((tblParcel.lngTPTID)=GETTPTID()));

The function GETTPTID() retrieves the ID which is updated every time the
main form updates to a new record.
I am trying to use the TabCtl On Change to initiate the requery for the
combo-box. Tried several approaches at a loss. The combo-box is used to
list the currently identified property parcels used when sending
correspondence. Not sure if I have explained the issue well enough? Any
suggestions would be greatly appreciated.

------------------------------------

Yahoo! Groups Links

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar