Anurag
|
| Posted: 04/11/2002, 1:03 AM |
|
Sir,
I Have a problem in accessing filterd records based on a condition.
I have a Login Table "LoginTable" which have the following fields :
User_id
User_name
Password
Designation
address
dept
I have another table named "Complaints" which have the following fields:
Complaint_id
Name_of_complaintee
subject
deptt
date_of_complaint
Complaint_details
I want to display records from Complaints table on the grid-form "OfiicerGrid"
when he logged into the system whrere the Complaints.Deptt=LoginTable.dept.
Thanks in advance
|
|
|
 |
CodeCharge Support
|
| Posted: 04/11/2002, 2:04 AM |
|
Anurag,
try to join complaints.deptt field to LoginTable.dept field on Complaints Grid form.
|
|
|
 |
Andrew B
|
| Posted: 04/11/2002, 7:34 PM |
|
That way involves writing custom sql, or using views/queries.
Another way to do it that doesn't involve custom sql :
In your logon form, when the user is authenticated (onLogin), retrieve the dept. id from the DB :
Session("DeptID") = DLookup("LoginTable", "DeptID", "Where clause")
'take a look at the other generated code to see what it does to get the right record.
Then, when you edit the properties for your grid form, add a parameter that uses 'deptt'. Make the type 'Session' and in the var. name field put 'DeptID'
That should do it.
If you have questions, post in here again.
|
|
|
 |
|