473,657 Members | 2,348 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 8670
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.FindRecor d 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
12043
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 record from a related table. Is there a way to do this? It would be nice to be able to right click on a cell in a datasheet and then select menu choice to open a form with related information, but it seems like to right click menues in Access...
3
9105
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 End Sub This works okay when only one record is selected and the delete key is pressed (or right-click delete is selected - makes no difference). But if multiple records are selected in the datasheet, the code runs for the first
2
7969
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 the table I have a hyperlink field that opens a form. Now say I have 10 Jones' and I want the form to open up to Andruw Jones not Chipper Jones. Is this possible? This is more of a curiosity question than anything.
2
2401
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 arrow key and vica versa). Is it possible to make it work like a list box? What I mean is that only rows are highlighted, not individual fields. You can do this in VB6 with a MSFlexGrid.
1
2958
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 part (stlinkcriteria) - but how do I have the new form open on the record that was current in the datasheet form? I don't want to filter to the current record when the 2nd form opens - I would like to be able to keep the whole rs and be able to...
3
3839
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 Datasheet View, the specific underlying record's Row... showing all columns Or selected columns. For a specific row's record ONLY, Or for all Xs (same type), or for the whole data sheet (all records... includes all types then), but focus still opens...
5
3481
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 the cursor was on in the datasheet at the time I executed the macro. So, the questions are: 1) In the macro, how to I get my hands on the record key or record data of the record the cursor was on in the datasheet at the time I executed the...
16
12599
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 delete operation in this specific case. I am trying to return the user back to the same row that he just selected the action on, and also at the same position on the screen - i.e. the same row and the same position of the scrollbar. An example: ...
14
4506
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 help! Any immediate assistance would be appreciated! I have a subform (sfrmProjects) in datasheet view. I'd like to double-click my datasheet records to open up a form (frmViewAllResources) in data entry mode. Every time I double-click on the...
0
8399
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
8827
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...
0
8732
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 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...
0
8606
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
7337
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
6169
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
5632
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();...
0
4159
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...
0
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.