I need to be able to click in a subform and run code but at the same time I
need to be able to scroll the records without running the code. I tried
coding the Enter event of the subform control but when I try to scroll the
records the code runs. The subform is continuous; all the controls are on
one line and the detail section is not exsposed above or below the controls.
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. I'm
looking for suggestions!
Thanks,
Sally 6 3806
Any reason you can't use a command button?
--
Ken Snell
<MS ACCESS MVP>
"Sally" <sm*****@notmyemail.com> wrote in message
news:Vs*****************@newsread1.news.pas.earthl ink.net... I need to be able to click in a subform and run code but at the same time I need to be able to scroll the records without running the code. I tried coding the Enter event of the subform control but when I try to scroll the records the code runs. The subform is continuous; all the controls are on one line and the detail section is not exsposed above or below the controls. 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. I'm looking for suggestions!
Thanks,
Sally
Thanks for responding, Ken,
Yes, there are forty two small subforms on the main form and the code needs
to know which one was clicked on. Clicking on any subform returns a value
that is specific to that subform.
Sally
"Ken Snell [MVP]" <kt***********@ncoomcastt.renaetl> wrote in message
news:u9**************@TK2MSFTNGP11.phx.gbl... Any reason you can't use a command button?
--
Ken Snell <MS ACCESS MVP>
"Sally" <sm*****@notmyemail.com> wrote in message news:Vs*****************@newsread1.news.pas.earthl ink.net...I need to be able to click in a subform and run code but at the same time
I need to be able to scroll the records without running the code. I tried coding the Enter event of the subform control but when I try to scroll
the records the code runs. The subform is continuous; all the controls are
on one line and the detail section is not exsposed above or below the controls. 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. I'm looking for suggestions!
Thanks,
Sally
You're saying there is no room for a command button on the subforms then?
The "click" event for a form occurs only if you click on the record selector
(if it's visible). And from your description, if you don't want to code
click events of every control on the subforms, then you'll need a different
approach.
Are the subforms' values/textboxes just for display? If you don't let the
user edit them, then you could put a single, transparent command button
across and on top of all the controls in a subform; and then use the click
event of that button to run your code.
--
Ken Snell
<MS ACCESS MVP>
"Sally" <sm*****@notmyemail.com> wrote in message
news:f_*****************@newsread3.news.pas.earthl ink.net... Thanks for responding, Ken,
Yes, there are forty two small subforms on the main form and the code needs to know which one was clicked on. Clicking on any subform returns a value that is specific to that subform.
Sally
"Ken Snell [MVP]" <kt***********@ncoomcastt.renaetl> wrote in message news:u9**************@TK2MSFTNGP11.phx.gbl... Any reason you can't use a command button?
--
Ken Snell <MS ACCESS MVP>
"Sally" <sm*****@notmyemail.com> wrote in message news:Vs*****************@newsread1.news.pas.earthl ink.net... >I need to be able to click in a subform and run code but at the same >time I > need to be able to scroll the records without running the code. I tried > coding the Enter event of the subform control but when I try to scroll the > records the code runs. The subform is continuous; all the controls are on > one line and the detail section is not exsposed above or below the > controls. > 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. I'm > looking for suggestions! > > Thanks, > > Sally > >
Yes, there is no room for a command button.
Yes, the textboxes on the subforms are only for display.
If I go with the command button, what happens when I scroll the records in
any subform and click in the area below the last record; I will be off the
command button? This is the reason for my post before this one. I am asking
if there is a way to code a click event for that area. That problem is
extenuated because there will only be one command button and hense most of
the area in the subform will not be covered by a command button.
Also, Allow Additions is set to False in the subforms.
To picture what I have better, the subforms are arranged like a calendar.
Sally
"Ken Snell [MVP]" <kt***********@ncoomcastt.renaetl> wrote in message
news:#n**************@TK2MSFTNGP10.phx.gbl... You're saying there is no room for a command button on the subforms then?
The "click" event for a form occurs only if you click on the record
selector (if it's visible). And from your description, if you don't want to code click events of every control on the subforms, then you'll need a
different approach.
Are the subforms' values/textboxes just for display? If you don't let the user edit them, then you could put a single, transparent command button across and on top of all the controls in a subform; and then use the click event of that button to run your code.
--
Ken Snell <MS ACCESS MVP>
"Sally" <sm*****@notmyemail.com> wrote in message news:f_*****************@newsread3.news.pas.earthl ink.net... Thanks for responding, Ken,
Yes, there are forty two small subforms on the main form and the code needs to know which one was clicked on. Clicking on any subform returns a
value that is specific to that subform.
Sally
"Ken Snell [MVP]" <kt***********@ncoomcastt.renaetl> wrote in message news:u9**************@TK2MSFTNGP11.phx.gbl... Any reason you can't use a command button?
--
Ken Snell <MS ACCESS MVP>
"Sally" <sm*****@notmyemail.com> wrote in message news:Vs*****************@newsread1.news.pas.earthl ink.net... >I need to be able to click in a subform and run code but at the same >time I > need to be able to scroll the records without running the code. I
tried > coding the Enter event of the subform control but when I try to
scroll the > records the code runs. The subform is continuous; all the controls
are on > one line and the detail section is not exsposed above or below the > controls. > 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.
I'm > looking for suggestions! > > Thanks, > > Sally > >
What I suggest is that you put the command button across the entire detail
section of the subform. That way, the button is available for all the
displayed records.
Because you have the subform set to not allow additions, there is no "extra"
record at the bottom, so there will not be a command button there. I don't
know what the "white space" is at the bottom of your subform...is the
subform's form footer?
--
Ken Snell
<MS ACCESS MVP>
"Sally" <sm*****@notmyemail.com> wrote in message
news:%o*****************@newsread1.news.pas.earthl ink.net... Yes, there is no room for a command button. Yes, the textboxes on the subforms are only for display.
If I go with the command button, what happens when I scroll the records in any subform and click in the area below the last record; I will be off the command button? This is the reason for my post before this one. I am asking if there is a way to code a click event for that area. That problem is extenuated because there will only be one command button and hense most of the area in the subform will not be covered by a command button.
Also, Allow Additions is set to False in the subforms.
To picture what I have better, the subforms are arranged like a calendar.
Sally
"Ken Snell [MVP]" <kt***********@ncoomcastt.renaetl> wrote in message news:#n**************@TK2MSFTNGP10.phx.gbl... You're saying there is no room for a command button on the subforms then?
The "click" event for a form occurs only if you click on the record selector (if it's visible). And from your description, if you don't want to code click events of every control on the subforms, then you'll need a different approach.
Are the subforms' values/textboxes just for display? If you don't let the user edit them, then you could put a single, transparent command button across and on top of all the controls in a subform; and then use the click event of that button to run your code.
--
Ken Snell <MS ACCESS MVP>
"Sally" <sm*****@notmyemail.com> wrote in message news:f_*****************@newsread3.news.pas.earthl ink.net... > Thanks for responding, Ken, > > Yes, there are forty two small subforms on the main form and the code > needs > to know which one was clicked on. Clicking on any subform returns a value > that is specific to that subform. > > Sally > > "Ken Snell [MVP]" <kt***********@ncoomcastt.renaetl> wrote in message > news:u9**************@TK2MSFTNGP11.phx.gbl... >> Any reason you can't use a command button? >> >> -- >> >> Ken Snell >> <MS ACCESS MVP> >> >> "Sally" <sm*****@notmyemail.com> wrote in message >> news:Vs*****************@newsread1.news.pas.earthl ink.net... >> >I need to be able to click in a subform and run code but at the same >> >time > I >> > need to be able to scroll the records without running the code. I tried >> > coding the Enter event of the subform control but when I try to scroll > the >> > records the code runs. The subform is continuous; all the controls are > on >> > one line and the detail section is not exsposed above or below the >> > controls. >> > 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. I'm >> > looking for suggestions! >> > >> > Thanks, >> > >> > Sally >> > >> > >> >> > >
Ken,
Thanks for staying with me on this! I found the solution. See my last post
in my previos thread Subform "White Areas".
Sally
"Ken Snell [MVP]" <kt***********@ncoomcastt.renaetl> wrote in message
news:#n**************@TK2MSFTNGP14.phx.gbl... What I suggest is that you put the command button across the entire detail section of the subform. That way, the button is available for all the displayed records.
Because you have the subform set to not allow additions, there is no
"extra" record at the bottom, so there will not be a command button there. I don't know what the "white space" is at the bottom of your subform...is the subform's form footer? --
Ken Snell <MS ACCESS MVP> "Sally" <sm*****@notmyemail.com> wrote in message news:%o*****************@newsread1.news.pas.earthl ink.net... Yes, there is no room for a command button. Yes, the textboxes on the subforms are only for display.
If I go with the command button, what happens when I scroll the records
in any subform and click in the area below the last record; I will be off
the command button? This is the reason for my post before this one. I am asking if there is a way to code a click event for that area. That problem is extenuated because there will only be one command button and hense most
of the area in the subform will not be covered by a command button.
Also, Allow Additions is set to False in the subforms.
To picture what I have better, the subforms are arranged like a
calendar. Sally
"Ken Snell [MVP]" <kt***********@ncoomcastt.renaetl> wrote in message news:#n**************@TK2MSFTNGP10.phx.gbl... You're saying there is no room for a command button on the subforms
then? The "click" event for a form occurs only if you click on the record selector (if it's visible). And from your description, if you don't want to code click events of every control on the subforms, then you'll need a different approach.
Are the subforms' values/textboxes just for display? If you don't let
the user edit them, then you could put a single, transparent command button across and on top of all the controls in a subform; and then use the click event of that button to run your code.
--
Ken Snell <MS ACCESS MVP>
"Sally" <sm*****@notmyemail.com> wrote in message news:f_*****************@newsread3.news.pas.earthl ink.net... > Thanks for responding, Ken, > > Yes, there are forty two small subforms on the main form and the code > needs > to know which one was clicked on. Clicking on any subform returns a value > that is specific to that subform. > > Sally > > "Ken Snell [MVP]" <kt***********@ncoomcastt.renaetl> wrote in message > news:u9**************@TK2MSFTNGP11.phx.gbl... >> Any reason you can't use a command button? >> >> -- >> >> Ken Snell >> <MS ACCESS MVP> >> >> "Sally" <sm*****@notmyemail.com> wrote in message >> news:Vs*****************@newsread1.news.pas.earthl ink.net... >> >I need to be able to click in a subform and run code but at the
same >> >time > I >> > need to be able to scroll the records without running the code. I tried >> > coding the Enter event of the subform control but when I try to scroll > the >> > records the code runs. The subform is continuous; all the controls are > on >> > one line and the detail section is not exsposed above or below the >> > controls. >> > 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. I'm >> > looking for suggestions! >> > >> > Thanks, >> > >> > Sally >> > >> > >> >> > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Shanfeng Cheng |
last post by:
I write a piece of code to tracking the number of clicks on a link
each day. The link usu. gets about 3000-6000 clicks per day. I just
store today's click count in a one-line text file, like,
...
|
by: Gary Kahrau |
last post by:
How do I programatically apply a click to a particular row and column
0 of a datagrid?
I want to do this in code as if the user did a mouse click on the
leftmost column.
...
|
by: cefrancke |
last post by:
I've read up on Access and the limits of creating visible controls at
run-time.
I'm using Access 2003 and assume that it cant be done.
I did find a clever method of having a main form (and in...
|
by: Robert |
last post by:
I have a form with two subforms on it. both subs have the same
controlsource. Subform1 is a continuous form that acts as an index. The
second subform is a single record that the user will use to...
|
by: stonward |
last post by:
I think this may be my final 'issue' with this project....!
I need to add products to a quotation/point of sale form. My products are listed in a listbox on my main form (frmMain) - when I click...
|
by: clarkp73 |
last post by:
Hi
In VBA I populate an unbound subform (datasheet view) via a recordset that can be changed using filters selected by the user. The only problem I am having is that due to the unbound nature of...
|
by: HSXWillH |
last post by:
I'm working in Access 2007 and coming to something that's always caused me problems. I have a form titled frmUsers. There are 3 subforms that list exercise dates and exercise types for each user. ...
|
by: Shona Rennie |
last post by:
I have the following in a form:
- Main Form which stores EE details
- 1st subform - a continuous form with a combo box which allows either selection of an existing contract or option to open...
|
by: neelsfer |
last post by:
When i use this code to count the number of records on display in a specific subform in the "txtRecordNo" field that is open now, it seems to "update" all the time as the cursor changes every second...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
| |