dbTalk Databases Forums  

Report Open Event

comp.databases.ms-access comp.databases.ms-access


Discuss Report Open Event in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Shakeel
 
Posts: n/a

Default Report Open Event - 12-15-2010 , 07:38 AM






Dear All
My report open event has the following code

Private Sub Report_Open(Cancel As Integer)
Dim strDocName As String
strDocName = "frmReportFilter"
DoCmd.OpenForm strDocName, acNormal, , , , acDialog
End Sub

How I do disable, lock or hide some controls over the said form,
because my form is also used for filtering some other reports where I
don't need some control

Reply With Quote
  #2  
Old   
Phil
 
Posts: n/a

Default Re: Report Open Event - 12-15-2010 , 09:20 AM






On 15/12/2010 13:38:55, Shakeel wrote:
Quote:
Dear All
My report open event has the following code

Private Sub Report_Open(Cancel As Integer)
Dim strDocName As String
strDocName = "frmReportFilter"
DoCmd.OpenForm strDocName, acNormal, , , , acDialog
End Sub

How I do disable, lock or hide some controls over the said form,
because my form is also used for filtering some other reports where I
don't need some control

Very confusing.

Let me get this right. You open a report, then that opens a form on which you
wish to hide or lock controls. What changes which controls are visible or
hidden, locked or unlocked. Does it depend on which report is open. As I
said, very confusing because the normal way is to open a form first and
generate a report based on the form's data

Phil

Reply With Quote
  #3  
Old   
paii, ron
 
Posts: n/a

Default Re: Report Open Event - 12-15-2010 , 09:34 AM



Use the openarg parameter to pass the form a flag. Then use the form's on
open event to modify the controls.

"Shakeel" wrote in message
news:c1a72fcc-5636-468b-8866-5adf88c0e96f (AT) l34g2000pro (DOT) googlegroups.com...

Dear All
My report open event has the following code

Private Sub Report_Open(Cancel As Integer)
Dim strDocName As String
strDocName = "frmReportFilter"
DoCmd.OpenForm strDocName, acNormal, , , , acDialog
End Sub

How I do disable, lock or hide some controls over the said form,
because my form is also used for filtering some other reports where I
don't need some control

Reply With Quote
  #4  
Old   
Shakeel
 
Posts: n/a

Default Re: Report Open Event - 12-15-2010 , 10:20 AM



On Dec 15, 8:20*pm, "Phil" <p... (AT) stantonfamily (DOT) co.uk> wrote:
Quote:
On 15/12/2010 13:38:55, Shakeel wrote:

Dear All
My report open event has the following code

Private Sub Report_Open(Cancel As Integer)
Dim strDocName As String
strDocName = "frmReportFilter"
DoCmd.OpenForm strDocName, acNormal, , , , acDialog
End Sub

How I do disable, lock or hide some controls over the said form,
because my form is also used for filtering some other reports where I
don't need some control

Very confusing.

Let me get this right. You open a report, then that opens a form on whichyou
wish to hide or lock controls. What changes which controls are visible or
hidden, locked or unlocked. Does it depend on which report is open. As I
said, very confusing because the normal way is to open a form first and
generate a report based on the form's data

Phil
Dear Phil

yes the it is the normal way to open a form first and generate a
report based on the form's data, my form contains 6 text boxes for
filtering the report on the basis of data provided in the text boxes,
as I am using this form to filter data for almost all my reports, some
of the reports needs three parameter some needs four & some needs all,
so I want want to disable or hide unused text box on the form when it
is open for a particular report.

Reply With Quote
  #5  
Old   
Access Developer
 
Posts: n/a

Default Re: Report Open Event - 12-15-2010 , 01:00 PM



You've described nothing that would make it difficult to open the form
first, choose from a list box the report you want to open, obtain from
another column of the list box (or hard code, if you must) the controls that
should be shown for that report, then when the user has done his/her part,
open the selected report.

Larry Linson, Microsoft Office Access MVP


"Shakeel" <shakeel.678 (AT) gmail (DOT) com> wrote

On Dec 15, 8:20 pm, "Phil" <p... (AT) stantonfamily (DOT) co.uk> wrote:
Quote:
On 15/12/2010 13:38:55, Shakeel wrote:

Dear All
My report open event has the following code

Private Sub Report_Open(Cancel As Integer)
Dim strDocName As String
strDocName = "frmReportFilter"
DoCmd.OpenForm strDocName, acNormal, , , , acDialog
End Sub

How I do disable, lock or hide some controls over the said form,
because my form is also used for filtering some other reports where I
don't need some control

Very confusing.

Let me get this right. You open a report, then that opens a form on which
you
wish to hide or lock controls. What changes which controls are visible or
hidden, locked or unlocked. Does it depend on which report is open. As I
said, very confusing because the normal way is to open a form first and
generate a report based on the form's data

Phil
Dear Phil

yes the it is the normal way to open a form first and generate a
report based on the form's data, my form contains 6 text boxes for
filtering the report on the basis of data provided in the text boxes,
as I am using this form to filter data for almost all my reports, some
of the reports needs three parameter some needs four & some needs all,
so I want want to disable or hide unused text box on the form when it
is open for a particular report.

Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.