Minggu, 04 November 2012

Re: [MS_AccessPros] time tracking DB

 

Dan-

Do you want the user to have to enter *either* the employee or the date,
or must the user enter both? If both, you can have Access filter the
first subform for you by setting the Link Master Fields property of the
subform to: NameOfEmpCombo; NameOfDateTextBox - and the Link Child Fields
property to: NameOfEmpIDField; NameOfDateField

The user will have to enter both values on the outer form to see records.

To get the second subform to filter to show the currently selected record
in the first subform, use the Link properties again. This is a bit
trickier because you want Access to refer not to controls on the parent
form but to controls on the other subform. Link Master will look
something like:

[Forms]![NameOfOuterForm]![NameOfFirstSubformControl].[Form]![NameOfEmpIDFi
eld];
[Forms]![NameOfOuterForm]![NameOfFirstSubformControl].[Form]![NameOfDateFie
ld]

In Link Child, enter the names of the EmpID and Date field controls
separated with a semi-colon.

To filter on either Employee or Date, you'll have to write some code to
apply a filter to the first subform in the AfterUpdate event of either
outer form control.

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: Dan Abc <daniel2478a@yahoo.ca>
Reply-To: <MS_Access_Professionals@yahoogroups.com>
Date: Sunday, November 4, 2012 11:34 PM
To: "MS_Access_Professionals@yahoogroups.com"
<MS_Access_Professionals@yahoogroups.com>
Subject: Re: [MS_AccessPros] time tracking DB

Hello,

for my DB I have a modal dialog which contains couple sub forms
i also have a combo box to select employee and test box to select date

my questions are:

1. by selecting an employee from the combo box how do you filter a sub
form list to show data only for that employee?
using a text box with date used to filter sub form list would be
similar i assume

2. i have 2 sub forms on the modal dialog, sub form "a" shows a small list
that will be filtered by employee and date and sub form "b" will show
detail of a record selected on sub form "a"
how do you do filtering on that?

thanks,

d

[Non-text portions of this message have been removed]

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

Yahoo! Groups Links

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

__,_._,___

Tidak ada komentar:

Posting Komentar