Dear all,
Can one control the subform scrollbar through vba?
For example, I would like to make two command buttons on the main form to
control the subform scrollbar. Click 1st button the subform vertical
scrollbar goes down to the end, click 2nd button goes up to the top
position.
Thank you for your help,
Paul 4 16446
Paul T. RONG <et***@hotmail. com> wrote in message
news:fY******** **********@news .chello.at... Dear all,
Can one control the subform scrollbar through vba?
For example, I would like to make two command buttons on the main form to control the subform scrollbar. Click 1st button the subform vertical scrollbar goes down to the end, click 2nd button goes up to the top position.
Thank you for your help,
Paul
Something like this should get you going if you create a command button and put
this
in the on click event
You need to change the subform name to suit
Go to last record use - acLast
Me.Reservations _Subform.SetFoc us
DoCmd.GoToRecor d , , acFirst
HTH
David B
See the SelTop sample Form here: http://www.lebans.com/setgetsb.htm
SetGetSB.zip is a database containing functions to allow a user to Set
or Get the current position of a ScrollBar Thumb for a Form.
NEW - Apr. 02/2000 The current ScrollBar position is equal to the
current Record Number being displayed at the Top of the Form.
Works in Form or Datasheet view.
Ver 1.7
Fix bug in SelTop method. Now works with first page of rows properly and
sets the Top row correctly when moving forward in the recordset one row
at a time.
Ver 1.6
Use SelTop to save Restore current row's position after a Requery.
Ver 1.5
Added support for Horizontal ScrollBars.
--
HTH
Stephen Lebans http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Paul T. RONG" <et***@hotmail. com> wrote in message
news:fY******** **********@news .chello.at... Dear all,
Can one control the subform scrollbar through vba?
For example, I would like to make two command buttons on the main form
to control the subform scrollbar. Click 1st button the subform vertical scrollbar goes down to the end, click 2nd button goes up to the top position.
Thank you for your help,
Paul
Thank you Steve,
The SetGetSB is a great work, but the codes are just too difficult for me.
And I realized that I have another hard nut to crack (see another post of
mine "help! subform vertical scrollbar problem").
regards,
Paul
"Stephen Lebans" <Fo************ *************** *************@l invalid.com>
??????:an****** *************** *@ursa-nb00s0.nbnet.nb .ca... See the SelTop sample Form here: http://www.lebans.com/setgetsb.htm SetGetSB.zip is a database containing functions to allow a user to Set or Get the current position of a ScrollBar Thumb for a Form.
NEW - Apr. 02/2000 The current ScrollBar position is equal to the current Record Number being displayed at the Top of the Form.
Works in Form or Datasheet view.
Ver 1.7
Fix bug in SelTop method. Now works with first page of rows properly and sets the Top row correctly when moving forward in the recordset one row at a time.
Ver 1.6
Use SelTop to save Restore current row's position after a Requery.
Ver 1.5
Added support for Horizontal ScrollBars.
--
HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit.
"Paul T. RONG" <et***@hotmail. com> wrote in message news:fY******** **********@news .chello.at... Dear all,
Can one control the subform scrollbar through vba?
For example, I would like to make two command buttons on the main form to control the subform scrollbar. Click 1st button the subform vertical scrollbar goes down to the end, click 2nd button goes up to the top position.
Thank you for your help,
Paul
David,
I think I didn't make me understood. I would like to move the subform scroll
bar without changing the focus on a certain record. But maybe I am wrong.
Thank you for your help.
Paul
"David" <Da***@hoofprin tnospam.fsnet.c o.uk>
??????:cp****** ****@newsg3.svr .pol.co.uk... Paul T. RONG <et***@hotmail. com> wrote in message news:fY******** **********@news .chello.at... Dear all,
Can one control the subform scrollbar through vba?
For example, I would like to make two command buttons on the main form
to control the subform scrollbar. Click 1st button the subform vertical scrollbar goes down to the end, click 2nd button goes up to the top position.
Thank you for your help,
Paul
Something like this should get you going if you create a command button
and put this in the on click event You need to change the subform name to suit Go to last record use - acLast
Me.Reservations _Subform.SetFoc us DoCmd.GoToRecor d , , acFirst
HTH David B This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David B |
last post by:
I have a sub form in datasheet view on a form.
I want a query to find the recordid every time a different row on the datasheet
has the focus.
The query is grabbing data for a combo on a second sub form.
Any thoughts ?
TIA
David B
Hexham UK
|
by: Cameron |
last post by:
Hi,
For the database I am currently working on, my employer would like the
ability to use multiple combo boxes in order to filter the database.
For instance the structure of the company is based on regions, which
are managed by a number of coordinators, who oversee a large group of
associates. I would like to use a combo box so that people accessing
the database can choose a particular region and then have a second
combo box that only...
|
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
|
by: kevin.jonas |
last post by:
Let say I have a form called "frmMachineSpecs" witht wo subforms,
"frmSpecs" and "frmMachines".
Both subforms are in datasheet view. The first control in "frmSpecs"
is "txtOEM_No".
I want to select a record in frmSpecs. Based on the OEM Number of the
record selected I want to display all the machines that use that spec
in the frmMachines subform.
How do I do this? I think I need to change the record source somehow.
|
by: Kranman |
last post by:
Hi All,
Love this site, have gotten a lot from it. This is my first time
posting though, so forgive me for any errors.
I have an Access 2000 db where I have a main form of Contractors and on
the main form is a subform of bonds carried by those contractors. I am
trying to reference a field named "Bond" located on the subform in
code that is run from the mainform and am having trouble with the
syntax for this. Below is a sample of...
| |
by: RzB |
last post by:
In a previous post in this NG (Oct 98)
http://makeashorterlink.com/?D505347FB
Henry Craven says that he was investigating a
relationship between the presence or absence of
a "Me!" prefix, the value of the Top propery of a
control, and the occurrence of an invalid runtime error
"The control or subform control is too large for this location"
|
by: qhimq |
last post by:
Hi,
I have a lot of edit child windows and text painted on a windows application made from the API all at runtime. How do I go about making the scrollbar to move them all?
What I attempted:
in the WM_PAINT message I have it paint a big red (later I will make white) rectangle filling the full window then it paints the text into its new position. The new position is takin from its initial position - the position of the scrollbar. For...
|
by: beacon |
last post by:
Hi everybody,
I have a form (frmDeficiency) with a tab control (called deficiencyTabControl) that has 8 tabs. The first tab is for general information, but the 2nd through the 8th tabs have a subform on them.
Tabs names for 2-8 are Admit, 7 Day, 14 Day, 30 Day, 90 Day, Annual, and Discharge.
The subform on the second tab (Admit) is based on a query that shows all records and allows the user to add/update records related to a patient...
|
by: Cornishgamehen |
last post by:
Hi,
I seem to have discovered a bug/problematic feature in Access 2002.
When navigating through records in a form, if a control in one of the subforms has the focus, and that subform becomes disabled through disabling of the tab page, then ALL subforms (not just the disabled one) become unavailable to reference in VB (at least in the On Current event). Attempting to reference one will cause a 2455 error.
Note that disabling the subform...
|
by: lvmoore |
last post by:
I have the calculation located in the footer of the subform.
There is sometimes no rows in this form so I have used Allen Browne's IIF(FormHasData(),calculation,0) syntax to show a zero if there aren't any rows to calculate on.
Consequently I copied his public function
Public Function FormHasData(frm As Form) As Boolean
'Purpose: Return True if the form has any records (other than new one).
' Return False for unbound forms, and forms...
|
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,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |