Form opening to new record

  • Thread starter BenEl via AccessMonster.com
  • Start date
B

BenEl via AccessMonster.com

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!
 
J

John W. Vinson

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.
 
B

BenEl via AccessMonster.com

John said:
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]

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!
 
B

BenEl via AccessMonster.com

I'm missing th ISNull statement, but I'm not sure how to write it. Any ideas?


[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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top