From: BenEl via AccessMonster.com on
Hi I am having a problem with my form not opening to the expected record. I
have a Summary form in datasheet view (frmCandidates). When the user double
clicks on the CandidateID a detail form opens (frmCandidateDetails).
frmCandidateDetails is based of the table CANDIDATES. The first tab is all
the detail info. The second tab contains a subform (frmJobDetails).
frmJobDetails is linked via CandidateID. When a user doubles clicks and
frmCandidateDetails opens, the user is able to see all the details and scroll
through all the related jobs on the second tab. The problem I am having is
that unless there is a related entry in the JobDetails, the
frmCandidatesDetails opens to a blank form. I can't figure out why. How can I
tell my macro to open the frmCandidatesDetails to the correct record even if
there the JobDetails is empty?

Thanks!

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201004/1

From: John W. Vinson on
On Mon, 26 Apr 2010 17:49:07 GMT, "BenEl via AccessMonster.com" <u56454(a)uwe>
wrote:

>Hi I am having a problem with my form not opening to the expected record. I
>have a Summary form in datasheet view (frmCandidates). When the user double
>clicks on the CandidateID a detail form opens (frmCandidateDetails).
>frmCandidateDetails is based of the table CANDIDATES. The first tab is all
>the detail info. The second tab contains a subform (frmJobDetails).
>frmJobDetails is linked via CandidateID. When a user doubles clicks and
>frmCandidateDetails opens, the user is able to see all the details and scroll
>through all the related jobs on the second tab. The problem I am having is
>that unless there is a related entry in the JobDetails, the
>frmCandidatesDetails opens to a blank form. I can't figure out why. How can I
>tell my macro to open the frmCandidatesDetails to the correct record even if
>there the JobDetails is empty?
>
>Thanks!

Correct the error in your doubleclick event. For help doing so please post the
macro steps or the VBA code here.
--

John W. Vinson [MVP]
From: BenEl via AccessMonster.com on
John W. Vinson wrote:
>>Hi I am having a problem with my form not opening to the expected record. I
>>have a Summary form in datasheet view (frmCandidates). When the user double
>[quoted text clipped - 10 lines]
>>
>>Thanks!
>
>Correct the error in your doubleclick event. For help doing so please post the
>macro steps or the VBA code here.

Here is the macro:

OpenForm
frmCandidateDetails, Form, , ="[CandidateID]=" & Nz([CandidateID],0), ,
Normal
Requery

Thanks!

--
Message posted via http://www.accessmonster.com

From: BenEl via AccessMonster.com on
I'm missing th ISNull statement, but I'm not sure how to write it. Any ideas?



BenEl wrote:
>>>Hi I am having a problem with my form not opening to the expected record. I
>>>have a Summary form in datasheet view (frmCandidates). When the user double
>[quoted text clipped - 4 lines]
>>Correct the error in your doubleclick event. For help doing so please post the
>>macro steps or the VBA code here.
>
>Here is the macro:
>
>OpenForm
>frmCandidateDetails, Form, , ="[CandidateID]=" & Nz([CandidateID],0), ,
>Normal
>Requery
>
>Thanks!

--
Message posted via http://www.accessmonster.com