473,507 Members | 2,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open Datasheet Form to Selected Record?

a2k (9.0.6926) SP-3 Jet 4.0 SP-7

I have a button on a Single Form that when pressed displays all the
underlying records in the table in a Datasheet Form.

For example, Northwind, Customer Table, say in Single Form, I'm on
Record ID 3, Antonio Moreno Taquería, when I press the Show All button
I want the Datsheet to open with all the records and Record ID 3
selected. (third one down from the top)

What is the code to make this happen?

Thanks, John
Nov 12 '05 #1
2 8659
Support4John wrote:
a2k (9.0.6926) SP-3 Jet 4.0 SP-7

I have a button on a Single Form that when pressed displays all the
underlying records in the table in a Datasheet Form.

For example, Northwind, Customer Table, say in Single Form, I'm on
Record ID 3, Antonio Moreno Taquería, when I press the Show All button
I want the Datsheet to open with all the records and Record ID 3
selected. (third one down from the top)

What is the code to make this happen?

Thanks, John


John,
You can easily re-open the form in Datasheet view, showing just the one
record:
DoCmd.OpenForm "FormName", acFormDS, , "[RecordID] = " & Me![RecordID]

But in addition to that you wish to show all the records. while having
focus on the selected one. You'll need to do it a bit differently.

DoCmd.OpenForm "FormName", acFormDS
Me![RecordID].SetFocus
DoCmd.FindRecord Me![RecordID]

How many actual records will be displayed depends upon the screen size
and the number of records in the database.
--
Fred
Please reply only to this newsgroup.
I do not respond to personal e-mail.
Nov 12 '05 #2
Thanks, worked perfectly
Nov 12 '05 #3

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

Similar topics

1
12007
by: edself | last post by:
I have a form which displays a subform datasheet of information. I'd like to be able to quickly click on a particular record and open up another form showing more detailed information about that...
3
9092
by: deko | last post by:
I have a form with a subform datasheet - I need code behind the OnDelete event of the subform: Private Sub Form_Delete(Cancel As Integer) 'do something that depends on which record is deleted...
2
7949
by: Bill Hand | last post by:
Is it possible to open a form from table and have it access a given record? I want to be able to query all baseball cards with the last name Jones and have it open a table. In each record of...
2
2397
by: Paul | last post by:
I have a datahsheet form. It is used as a sub-form within a main form. When moving within the datasheet sub-form the cursor goes from one field to the next (left to right if pressing the right...
1
2950
by: 4004 | last post by:
I would like to open a columnar form (so I can see all the details) from a datasheet form (so I can see what is there) but keep the same recordset and current record. I can do the recordset set...
3
3830
by: Cagey | last post by:
What I'm trying for: If this selection or if click on selection (highlighted line choice/ which ever selection change) w/in query's combo dropdown list box (on Switchboard), then Open in...
5
3473
by: Bill | last post by:
This database has no forms. I am viewing an Access table in datasheet view. I'd like to execute a macro to execute a function (using "runcode"). In the function, I'll reading data from the record...
16
12570
by: ulam | last post by:
I have a form shown in datasheet view, and I have some actions that require that form to be requeried with a delete operation, however number of rows in the datasheet view remains constant with a...
14
4487
by: BASSPU03 | last post by:
(I'm using Access 2003 on a Windows XP O/S.) I've gotta present an update on my database this week--possibly within the next 24 hours. A solution or guidance to this inquiry would really, really...
0
7221
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,...
0
7109
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...
0
7372
jinu1996
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...
1
7029
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...
0
7481
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...
1
5039
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...
0
4702
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.