473,385 Members | 1,341 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Selecting the first record of a subform in datasheet view?

What is the line of code to select the first record of a subform? I
have a form with two subforms. What you select in one subform controls
what is queried in the second subform. however when the form starts a
record isn't selected and the second subform shows all data.

Kevin

Nov 13 '05 #1
3 8538
> What is the line of code to select the first record of a subform? I
have a form with two subforms. What you select in one subform controls
what is queried in the second subform. however when the form starts a
record isn't selected and the second subform shows all data.


Inside the Load event of the subform, you could do this:

Me.Recordset.MoveFirst
--
Peace & happy computing,

Mike Labosh, MCSD
"I have no choice but to believe in free will."
Nov 13 '05 #2
I already tried that. It selects the first field but doesn't fire the
On Current event. So I called the On Current Event from the Form Load
and it still doesn't update the second subform until I physically
select a different record in the first subform.

Nov 13 '05 #3
I sorta figured it out, used the wrong form load function. I needed to
use the main form's form load, not the subforms.
Reading MS's docs a form automatically selects the first record when it
loads. So movefirst doesn't do anything since it is already at the
first record. I needed to also set the recordsource for the second
subform int he main form's load form. I also set the subform to the
same query in the first subform's on current event. It all works.

Nov 13 '05 #4

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

Similar topics

2
by: Phil Matish | last post by:
I would like to know if the following is possible: I have a form and a subform. In the subform, there are records summarized. (For ex, instead of showing all 19 fields, I only show 3 to save...
1
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
by: Mark | last post by:
Hi there, I have a subform, set as a continuous form. When a user selects a particular record in that subform, how can I make that particular record stand out (color or font change, size, etc) from...
8
by: anansi | last post by:
Hi I have a form called 'shiftviewer' and it contains a subform called 'all shifts for current month subform'. the subform is in datasheet view (access 2007) and the main form is a column...
1
by: Parasyke | last post by:
Thanks in advance... I need to on a subform in datasheet view to be able to, instead of delete a record, move that record to another table. I can if needed turn the subform into a continuous form...
3
by: ApexData | last post by:
I have created a SearchForm which is basically a PopUp Continuous Form that displays 15 Fields. Each field is displayed as a column and when the user clicks on any record or row, the form closes...
4
by: Orv | last post by:
I have a search form which contains a non-linked subform. When I fill the criteria of my search and click the search button it returns the results in the subform, datasheet view. I then want to...
5
by: kknb0800 | last post by:
Hi, I'm new to Access but I've searched for a long time for a solution but to no avail. What I'm trying to do is create an address database whereby the user is able to enter addresses through...
1
by: ncsthbell | last post by:
I think I am just having a 'brain fog' moment... I can not remember how to do this. I have a main form and on the main form I have a subform(sfDetails). My subform is in datasheet view. I put a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.