Title: Message
First of all, avoid macros!  Set up a query for the second form for details to be its datasource.  (And also, set up the primary key of the call history table to be an autonumber, not the actual data field.)  Then when you call the detail form, use a criteria string to limit the data:
 
DoCmd.OpenForm strForm,,,"[ID]=" & Me.KeyID
 
The three commas in there are needed because there are a couple other parameters in the DoCmd statement.
 
Tobi
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jose Luis Jr Mora Jr
Sent: Thursday, December 01, 2005 12:09 PM
To: [email protected]
Subject: [AccessDevelopers] Filtering a form

Hi everyone,
 
I have a rather simple dilemma but for some reason I cannot get this to work.  Can someone help me out?
 
I am creating a database for a crisis hotline where people call-in if they are feeling depressed, need someone to talk to, etc.  In the database, I am tracking basic information -- date/time the person calls, the identity they choose to reveal to the hotline, medication the person may be taking, etc.
 
One of the other things that needs to be tracked is each phone call that is received by the hotline.  It is possible to receive multiple phone call by the same person as well as only receiving one call per person.  The dilemma that I am having is that I have the basic information of the person on a main form and call history in a subform.  I am trying to setup a macro where if I double-click on one of the call history entries a 2nd form open with a more detailed view of the call.  I have the following setup:
 
Basic Information
----------------------------------
Client ID ---- Primary key
 
 
Call history table
-------------------------------------
Call received ---> Primary
Client ID ---> Foreign Key
 
 
I am trying to filter for all entries where Client ID (foreign key) matches Client ID (primary key) in a macro.  I have also tried to do this with the 2nd form which is open by the filtering option.
 
Any ideas?



Please zip all files prior to uploading to Files section.




SPONSORED LINKS
Microsoft access developer Microsoft access help Microsoft access database
Microsoft access training Microsoft access training course Microsoft access programming


YAHOO! GROUPS LINKS




Reply via email to