473,398 Members | 2,368 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,398 software developers and data experts.

Datasheet Form, iterate through records

I have this click event on my form. It speaks to a Datasheet Subform
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command260_Click()
  2.  Dim r As DAO.Recordset
  3.  Set r = Form_frmABCD.Form.RecordsetClone
  4.  r.MoveFirst
  5.  Do
  6.     If Nz(r(2)) = "" Then
  7.     Stop
  8.     'Need to move form to this record.  Bookmark??
  9.     Form_frmABCD.RunSelectForm (1)
  10.     DoEvents
  11.     End If
  12.  r.MoveNext
  13.  Loop Until r.EOF
  14. End Sub
RunSelectForm is a routine normally called by a d-click in frmABCD. I'd like to use it with the above
but it sees only the current row in the datasheet. r.MoveNext does not 'move' to the next row.
I understand why, but unsure what is a good solution. I could use the recordset values and write a new routine.
But if I could move to the next row in the Form automatically within the Do Loop nothing more would be needed.
But what command might do this, if it is possible?
Thanks for any help.
Jun 6 '23 #1
1 13121
jimatqsi
1,271 Expert 1GB
Yes, bookmark is what you need. I believe what you need is
Expand|Select|Wrap|Line Numbers
  1. me.bookmark = r.bookmark  
in line 8, and then destroy temp objects and leave the routine.

Jim
Jun 7 '23 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: CLarkou | last post by:
Is there any way to get the record(s) the user has selected in a Datasheet form ?
2
by: CLarkou | last post by:
Is there any other way of looping in the fields of records in a Datasheet form, except from the following one (moving to each record) for checking the field values ? For I = 1 To var_end_R...
2
by: Support4John | last post by:
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...
1
by: Fred Ferreira | last post by:
Hi there Does anybody know how I can lock the column widths at Datasheet form view?
2
by: Arnie | last post by:
I have searched this NG for datasheet column width posts and have read many of them. None of them seem to address what I would like to do. I'm beginning to think what I want can't be done. Here...
1
by: Thelma Lubkin | last post by:
I have a form that allows a user to choose a specific field value. The form calls a second, datasheet, form using a different field in the selected record as a filter . This second form has a...
3
by: paulquinlan100 | last post by:
Hi Apologies for it is im sure a very basic question... Ive created a fairly standard datasheet form based on a query, however, whenever i open the form there doesnt seem to be a way of adding...
2
by: eko99312 | last post by:
Let's say I have this form called Attendance List. The list was in datasheet form. In the list there were names and date checklist. The question is, I want to edit one of the names by double clicking...
4
by: Joe Y | last post by:
In a datasheet form I have the following Text Boxes. This datasheet form is embedded in a main form where the formula ID is linked. The datasheet form’s record source is bound to a Query named...
5
by: hvsummer | last post by:
Hi guy, Datasheet form in Access is very good function, I can do the same thing in Excel by Sheets(i).Usedrange.copy Set NewBook = Workbooks.Add(xlWBATWorksheet) With NewBook ...
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
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...

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.