[AccessD] Question 2...returning to a form

jwcolby jwcolby at colbyconsulting.com
Fri Jan 8 15:55:20 CST 2010


John,

You didn't really specify how the two forms inter-operate.  does the calling form close and reopen? 
  If so why?  If it doesn't close, then it should still be at that record when you are done.

Likewise, when you say "data entry form" are you saying a form that opens on the new record to allow 
you to enter a new record (data entry mode)?  Or just "generically" a form that you use to enter 
data on.

It is trivial to pass information to an opening form.  Pass in the PKID of the record that you are 
coming from.  Then when control returns to the calling form, just seek to that record.

In my framework, I often pass in the PK of the record that the OPENING form should seek to.  When 
the form opens, it gets that PKID, then goes to the record requested.

Usually if I want a new form to do something but to get back to the same record in the calling form, 
I just leave the calling form open and open the new form modal.  When I close the new form I am back 
where I started.

John W. Colby
www.ColbyConsulting.com


John Clark wrote:
> OK, for those of you that might have read my other post, this is the next question...
>  
> For those of you that may not have read it...or maybe your attention span is like mine and...where was I...oh, yeah...maybe you just need a reminder...
>  
> I've got an entry form, w/a button on it. Press the button and a voucher is created from the data, and you get a print preview of said voucher. When you close the preview, you are returned to the data entry form. But...and herein lies the question...you are returned to record #1, and not where you were.
>  
> This isn't a huge problem, because in reality, you would almost always be done w/a record, once you print and wouldn't need to return to it. But, the whole reason it goes to a preview to begin with, is that you can check and amend data. So, if there is a reason to change something, I don't want it going to record one and need to travel back to the current record. 
>  
> An easy, although not perfect, approach to this, might be to just open the form to the last record...contemplating this anyhow. Most of the time we will be printing the last record anyhow, so this would probably get us by, for the most part. 
>  
> However, if for no other reason, I'd like to do this, just so I can learn how to do it. So, how can I have my calling form return to its last known record?



More information about the AccessD mailing list