473,782 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Subform datasheet selection

Is there a way to perform actions on the selected records of a
datasheet subform? Actually I know it can be done from a pulldown menu
or a toolbar. But how can you create a button on the form that will do
the same thing? My problem is that every time you select something on
the datasheet when you click a button or any control you will lose the
selection. Is there anyway to prevent that? I'd rather create a
button than try to manage toolbar menus. Any help would be
appreciated. Here is the code that works with menu toolbar:

Public Function t1()
Dim i As Long
Dim strSQL As String
Dim loqd As QueryDef

vbSelectHeight =
Forms!wlef_Work List_Edit!wlef_ WorkList_Edit_S ub.Form.SelHeig ht

If Forms!wlef_Work List_Edit!wlef_ WorkList_Edit_S ub.Form.SelHeig ht = 0
Then
Exit Function
End if

With
Forms!wlef_Work List_Edit!wlef_ WorkList_Edit_S ub.Form.Records etClone
.MoveFirst
.Move
Forms!wlef_Work List_Edit!wlef_ WorkList_Edit_S ub.Form.SelTop - 1
For i = 1 To vbSelectHeight
MsgBox DocNo 'do something for each selected record
.MoveNext
Next i
End With
End Function

Nov 13 '05 #1
1 2733
>Is there anyway to prevent that?

I dont think so.

You're now instead in the business of giving every control on your datasheet
a event proc to trap SelHeight, etc into globals whenever they are exited.

I'd go with spending time managing the toolbars.

My 2 cent.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
12605
by: deko | last post by:
I have two subforms within a particular form. The one on top is a datasheet of transactions; the one on the bottom is a summary of totals. I would like to have the datasheet fill the entire parent form until a command button is clicked, then have the datasheet form shrunk to half it's original height and have the totals summary form appear below it. The totals summary sheet, then, would not be visible until the command button is clicked,...
2
5361
by: ivan | last post by:
I have a form (CustomerImfo) that has a subform within it (order). Within that subform is another subform (OrderDetail). That subform (OrderDetail) is displayed in Datasheet view. When I am entering customers and their respective orders, the first order entered is fine with the "tab" field orders correct. On the second and subsequent orders, when I go from the Order form to the subform "OrderDetail", the curser goes to the wrong field...
3
4146
by: Joshua Ammann | last post by:
Hi, (Using Access 2000) I have two tables, similar to Customers and Orders. (Not an exact parallel, but works for this example.) On a form showing customer data, there is a tab control. One of the tabs has a subform showing order data (in datasheet view). On the same tab there is an unbound textbox (next to the datasheet). I placed a
1
3085
by: shumaker | last post by:
I've loked over older messages on this, but haven't found a solution. I have a datasheet of records, and each record has a subform that can be viewed with the expand '+' symbol. The subform simply shows addition fields of the record it is expanded from. I used the subform control wizard to tell it how to link the records when creating the subform. There is only one control in the subform that the users can edit, a textbox. All the...
9
2748
by: PC Datasheet | last post by:
I'm stuck on something that seems should be easy and I need some help. My main form has an option group with five options. My subform chooses from different lists depending on which option is selected in the main form. I thought all I had to do for the subform was create a query and set the criteria equal to the option group value in the main form. No way, Jose! When the form/subform opens, the option group value is not available to the...
5
3629
by: PC Datasheet | last post by:
Is there a way to page through a subform using PageDown and PageUp? Thanks! Steve PC Datasheet
1
2205
by: jerry.ranch | last post by:
So I've been playing with combo boxes and subforms. Finally, I can make a selection in a combo box, and have that drive an after update event to open a query or a form. Works famously. Now the next step is to bury the form in the same form where the cmb is located (as a subform) I use two linked cmb. And I have linked the second cmb with the subform. A selection in the first cmb limits the selection in the second cmb. A selection...
1
1397
by: keri | last post by:
Hi and apologies for duplicates. I am having some posting issues so thought i'd start afresh. Please treat me as a beginner so I get very simple explanations! The below is driving me crazy; I want a form (frm book appointment) that has a subform with a datasheet table / query (all customer records). I want to be able to enter search terms in up to 6 textboxes on my main
4
5207
WyvsEyeView
by: WyvsEyeView | last post by:
I am doing the very standard thing of filtering the contents of one combo box based on another combo box. I've done it many times, but always on a main form. Now I'm trying to do it on a datasheet subform and it is not working. After making the selection in the first combo box, when I move to the second combo box, I get the Access input parameters box. If I input the value that is in the first combo box, I get the expected results in the second...
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10081
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9946
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.