How to display the right record ?

  • Thread starter Thread starter Nikko
  • Start date Start date
N

Nikko

Hello,

I'am building an application, querying a database of firms, employees,
and actions,
each firm containing several employees, each employee having zero or
more actions linked with.
I have an employee form-datasheet listing. Cliking one employee gets me
the employee id. I want to display the employee's firm form.
My question is : How do i synchronize the firm form, to display the
right firm?

thanks.
 
Nikko said:
I'am building an application, querying a database of firms, employees,
and actions,
each firm containing several employees, each employee having zero or
more actions linked with.
I have an employee form-datasheet listing. Cliking one employee gets me
the employee id. I want to display the employee's firm form.
My question is : How do i synchronize the firm form, to display the
right firm?


If you are opening the Firms form, then use the OpenForm
method's WhereCondition argument to filter the the data to
the desired firm.

If the forms form is already open, then you could use its
Filter property to do that.

Without more details about your forms and what you are
trying to do, I can't provide a more specific answer.
 
Nikko said:
I'am building an application, querying a database of firms, employees,
and actions,
each firm containing several employees, each employee having zero or
more actions linked with.
I have an employee form-datasheet listing. Cliking one employee gets me
the employee id. I want to display the employee's firm form.
My question is : How do i synchronize the firm form, to display the
right firm?


Please don't post the same question multiple times.

I responded to this question is another group.
 
The Docmd.OpenForm method has a WHERE clause.

If you can pass the Employee's FirmID, based on the known EmployeeID. You
can open a recordset or use Dlookup to retrieve it.

Then, in the OpenForm, pass the FirmID

e.g. Docmd.Openform "Formname", where:="FirmID " & lngFirmID

--
Steve Clark, Access MVP
FMS, Inc
http://www.fmsinc.com/consulting
Professional Access Database Repair
*FREE* Access Tips: http://www.fmsinc.com/free/tips.html
 
Nikko said:
Hello,

I'am building an application, querying a database of firms, employees,
and actions,
each firm containing several employees, each employee having zero or
more actions linked with.
I have an employee form-datasheet listing. Cliking one employee gets me
the employee id. I want to display the employee's firm form.
My question is : How do i synchronize the firm form, to display the
right firm?

Here's one example:

http://support.microsoft.com/kb/149940/en-us
 
Marshall Barton a écrit :
Please don't post the same question multiple times.

I responded to this question is another group.
You haven't look well ! this was an xpost + fu2 !!
Anyway thanks for your answer Marsh.
 
[MVP] S.Clark a écrit :
The Docmd.OpenForm method has a WHERE clause.

If you can pass the Employee's FirmID, based on the known EmployeeID. You
can open a recordset or use Dlookup to retrieve it.

Then, in the OpenForm, pass the FirmID

e.g. Docmd.Openform "Formname", where:="FirmID " & lngFirmID
OK let's see what we have.
If i put a where clause, the form is intended to display and/or change
the firm's attributes.
Now imagin i want to retrieve one employee from one firm. I should use
the where clause.
Now what if i want the employees form to display nonetheless the right
employee, but every employees of the firm (shifting whith the selector)
AND the possibility to add new employees.
I have to use a subform with parent/child fields,
but what about the method to display the right employee chosen in the
previous list ? How do i positionnate the employee's form to that
particuliar id ?

thank you for iam a bit lost i should say...
 
Back
Top