By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,471 Members | 711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,471 IT Pros & Developers. It's quick & easy.

Subform "White Areas"

P: n/a
In a subform that has no records, what is the white area? If a subform has
records and you scroll the records, what is the white area after the last
record? I would like to be able to click in these white areas and run code.

Thanks,

Sally
Nov 13 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
I think you are referring to the new record row that is the last row in the
subform - the only row if there are no records. It's there so you can type
in a new record to be added to the table.

You can test whether the new record row is current by testing the NewRecord
property of the form. Example:
If Me.NewRecord Then
MsgBox "You are in the new record row"
End If

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Sally" <sm*****@notmyemail.com> wrote in message
news:zj*****************@newsread1.news.pas.earthl ink.net...
In a subform that has no records, what is the white area? If a subform has
records and you scroll the records, what is the white area after the last
record? I would like to be able to click in these white areas and run
code.

Nov 13 '05 #2

P: n/a
Allen, thank you for responding!

The records in the subform are for display only. Allow Additions is set to
False so there is no new record row. I need to be able to click in the area
below the last record when I scroll and run code. I also need to be able to
click in the area of the subform when there are no records and run code. And
I need to be able to scroll the subform without running code.

Sally
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:41**********************@per-qv1-newsreader-01.iinet.net.au...
I think you are referring to the new record row that is the last row in the subform - the only row if there are no records. It's there so you can type
in a new record to be added to the table.

You can test whether the new record row is current by testing the NewRecord property of the form. Example:
If Me.NewRecord Then
MsgBox "You are in the new record row"
End If

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Sally" <sm*****@notmyemail.com> wrote in message
news:zj*****************@newsread1.news.pas.earthl ink.net...
In a subform that has no records, what is the white area? If a subform has records and you scroll the records, what is the white area after the last record? I would like to be able to click in these white areas and run
code.


Nov 13 '05 #3

P: n/a
The area below the records in a continuous form is not programmable. It does
respond to Form_Click, but so do other areas of the screen (e.g. the record
selector).

I'm not sure how you expect to scroll the subform without running any code:
perhaps by clicking with the mouse on the scrollbar?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Sally" <sm*****@notmyemail.com> wrote in message
news:Du*****************@newsread1.news.pas.earthl ink.net...
Allen, thank you for responding!

The records in the subform are for display only. Allow Additions is set to
False so there is no new record row. I need to be able to click in the
area
below the last record when I scroll and run code. I also need to be able
to
click in the area of the subform when there are no records and run code.
And
I need to be able to scroll the subform without running code.

Sally
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:41**********************@per-qv1-newsreader-01.iinet.net.au...
I think you are referring to the new record row that is the last row in

the
subform - the only row if there are no records. It's there so you can
type
in a new record to be added to the table.

You can test whether the new record row is current by testing the

NewRecord
property of the form. Example:
If Me.NewRecord Then
MsgBox "You are in the new record row"
End If
"Sally" <sm*****@notmyemail.com> wrote in message
news:zj*****************@newsread1.news.pas.earthl ink.net...
> In a subform that has no records, what is the white area? If a subform has > records and you scroll the records, what is the white area after the last > record? I would like to be able to click in these white areas and run
> code.

Nov 13 '05 #4

P: n/a
rkc
Sally wrote:
Allen, thank you for responding!

The records in the subform are for display only. Allow Additions is set to
False so there is no new record row. I need to be able to click in the area
below the last record when I scroll and run code. I also need to be able to
click in the area of the subform when there are no records and run code. And
I need to be able to scroll the subform without running code.


What view is the sub form in?
What have you tried so far?
Nov 13 '05 #5

P: n/a
There are actually 42 continuous subforms arranged in a layout like a
calendar. Allow Additions is set to False in the subforms. All the controls
are on one line and the detail section is not exsposed above or below the
controls. The textboxes on the subforms are only for display. There is no
room for a command button.

I tried coding the Enter event of the subform control but when I try to
scroll the records the code runs. I tried coding the detail Click event but
nothing happened. I tried coding the Enter event of the controls and that
worked when I clicked on a control. The problem with that though is that the
code doesn't execute when there are no records or when I click in the white
area after the last record.

Sally

"rkc" <rk*@rochester.yabba.dabba.do.rr.bomb> wrote in message
news:PI********************@twister.nyroc.rr.com.. .
Sally wrote:
Allen, thank you for responding!

The records in the subform are for display only. Allow Additions is set to False so there is no new record row. I need to be able to click in the area below the last record when I scroll and run code. I also need to be able to click in the area of the subform when there are no records and run code. And I need to be able to scroll the subform without running code.


What view is the sub form in?
What have you tried so far?

Nov 13 '05 #6

P: n/a
rkc
Sally wrote:
There are actually 42 continuous subforms arranged in a layout like a
calendar. Allow Additions is set to False in the subforms. All the controls
are on one line and the detail section is not exsposed above or below the
controls. The textboxes on the subforms are only for display. There is no
room for a command button.

I tried coding the Enter event of the subform control but when I try to
scroll the records the code runs. I tried coding the detail Click event but
nothing happened. I tried coding the Enter event of the controls and that
worked when I clicked on a control. The problem with that though is that the
code doesn't execute when there are no records or when I click in the white
area after the last record.


So you haven't tried the form's click event? Seems to me that is
exactly what you want. It fires when you click a record selector
or what you call the empty space below the controls and not when you
click the scroll bars or the detail section.
Nov 13 '05 #7

P: n/a
rkc,

That's it!!! As you said .... the form click event fires when you click the
empty space below the controls. It also fires when you click anywhere when
there are no records. It does not fire when you click the scroll bars or the
detail section. I added the same code in the click event of the controls and
the click event of the detail section and now I can click anywhere in the
subform and the code is executed. If I click on the scroll bars, no event
fires.

Thanks for putting me on the right path!!

Sally
"rkc" <rk*@rochester.yabba.dabba.do.rr.bomb> wrote in message
news:qh********************@twister.nyroc.rr.com.. .
Sally wrote:
There are actually 42 continuous subforms arranged in a layout like a
calendar. Allow Additions is set to False in the subforms. All the controls are on one line and the detail section is not exsposed above or below the controls. The textboxes on the subforms are only for display. There is no room for a command button.

I tried coding the Enter event of the subform control but when I try to
scroll the records the code runs. I tried coding the detail Click event but nothing happened. I tried coding the Enter event of the controls and that worked when I clicked on a control. The problem with that though is that the code doesn't execute when there are no records or when I click in the white area after the last record.


So you haven't tried the form's click event? Seems to me that is
exactly what you want. It fires when you click a record selector
or what you call the empty space below the controls and not when you
click the scroll bars or the detail section.

Nov 13 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.