Selasa, 12 Oktober 2021

Re: [MSAccessProfessionals] On Load or On Current populate fields on a report for printing

Also be aware that the Load() event only fires when the form/report first starts. 

The Form_Current() event fires whenever the form has a recordset and the record that has the focus (current record) changes.  If the form has a recordset on load, this event fires on startup after Form_Load().

The Form_Current() event does NOT fire when the form starts if the form does NOT have a recordset.

 

Hope this helps…

 

From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> On Behalf Of Paul Baldy
Sent: Tuesday, October 12, 2021 10:46 AM
To: MSAccessProfessionals@groups.io
Subject: Re: [MSAccessProfessionals] On Load or On Current populate fields on a report for printing

 

If you mean that some records will display one field and others a different one, neither event.  You'd use the format event of the detail section (or whatever section contains the controls).  Also, nothing is "=" to Null; you'd use the IsNull() function.

 

Paul

 

------ Original Message ------

From: "michael simpson via groups.io" <saccity101=yahoo.com@groups.io>

Sent: 10/12/2021 7:39:59 AM

Subject: [MSAccessProfessionals] On Load or On Current populate fields on a report for printing

 

Good morning - 

Due to personal issues I've not worked on my software for too long... 

Hoping to get back on the task... 

I've not worked much with reports, and I have never been clear on when to use on load, and on current procedures.  

 

Specifically I have a form that I sent to a report and then print.. 

Several of the fields may be blank, for example the Warranty Note, 95% of the work orders use a standard note, the remainder will have something other.. 

 

If Warranty Note = Null Then 

    Standard Note

Else 

    Custom Note

End If

 

Should this be in the On Load or On current event procedure

Take care,

Mike the Plumber

Sac City Plumbing

 

Tidak ada komentar:

Posting Komentar