Subform not showing the correct records

gobyg

Registered User.
Local time
Today, 00:27
Joined
Jul 18, 2013
Messages
20
Table Info:

EmpProfile: EmpID (Primery Key), EmpFirstName, EmpLastName, Emptitle, EmpPhoneNumber

EmpTimes: EmpID (1 to Many relationship with EmpID primery key), Timein, Break, TimeOut, Totalhours

Query Name:
Selects the table from EmpTimes
Calculates the total hours worked for an empid, on a given day. It produces the total hours as "CalcTime"


Form Info:

1st Form Name: MainForm
Text name to enter empID : Txtempid (unbound)
Record Source: EmpProfile


2nd form name: SFTimeSheet
This is a subform within main form
Record Source: QryTime
Child and master fields are linked using : EmpID


Expecting Result:

When enter empid on the MainForm, in txtempid
subform should retrieve all entries for that empid

Getting result:

regardless what empid entered in txtempid, subform shows only the 1st record available in EmpTimes.


Any help is appriciated.
 
How is the employee being selected on the main form? When you scroll through the records on the main form does the subform change? It sounds like you have a bound main form and are just changing the empID of the first record instead of navigating to the record.
 
I actually made this work, by changing the txtempid to empid.

Soon after the change subform started to show the right data belongs to the user.

Thank you boblarson anyway
 

Users who are viewing this thread

Back
Top Bottom