A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Form opening to new record



 
 
Thread Tools Display Modes
  #1  
Old April 26th, 2010, 06:49 PM posted to microsoft.public.access.forms
BenEl via AccessMonster.com
external usenet poster
 
Posts: 18
Default Form opening to new record

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/For...forms/201004/1

  #2  
Old April 26th, 2010, 07:08 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Form opening to new record

On Mon, 26 Apr 2010 17:49:07 GMT, "BenEl via AccessMonster.com" u56454@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]
  #3  
Old April 26th, 2010, 07:52 PM posted to microsoft.public.access.forms
BenEl via AccessMonster.com
external usenet poster
 
Posts: 18
Default Form opening to new record

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

  #4  
Old April 27th, 2010, 07:54 PM posted to microsoft.public.access.forms
BenEl via AccessMonster.com
external usenet poster
 
Posts: 18
Default Form opening to new record

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:15 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.