473,472 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

subform's recordset problems

Hi all,

I have a form with a subform called "mySubForm" (the subform is always
in datasheet view), and I have a button labeled "return item". When
users click return item, it finds the record from the datasheet, and
it modifies some fields.

The problem is, I am randomly getting an error saying "no current
record". When I check
me.mySubForm.form.currentRecord, it shows a perfectly valid
currentRecord value. But when I look at the actual recordset
(me.mySubForm.recordset), it says that there is no currentRecord.

Anyone have any idea what's going on?

P.S I haven't been able to determine why this occurs randomly.
Everyone once in a while, it just looses the currentRecord.

Thanks

Jul 12 '07 #1
1 4140
I ended up fixing this with the following code,

Dim correctRecord as string
correctRecord = Me.mySubForm.Form.currentRecord
Me.mySubForm.Form.Recordset.MoveFirst
Me.mySubForm.Form.Recordset.Move (correctRecord - 1)

It worked, but the fact that Access seems to forget the currentRecord
is still a mystery to me.

Mark

On Jul 12, 1:29 pm, mark_aok <mark_...@hotmail.comwrote:
Hi all,

I have a form with a subform called "mySubForm" (the subform is always
in datasheet view), and I have a button labeled "return item". When
users click return item, it finds the record from the datasheet, and
it modifies some fields.

The problem is, I am randomly getting an error saying "no current
record". When I check
me.mySubForm.form.currentRecord, it shows a perfectly valid
currentRecord value. But when I look at the actual recordset
(me.mySubForm.recordset), it says that there is no currentRecord.

Anyone have any idea what's going on?

P.S I haven't been able to determine why this occurs randomly.
Everyone once in a while, it just looses the currentRecord.

Thanks

Jul 12 '07 #2

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

Similar topics

15
by: Rey | last post by:
Howdy all. Appreciate your help with several problems I'm having: I'm trying to determine if the Visit subform (subformVisits) has a new record or been changed, i.e. dirty. The form that...
0
by: Carl | last post by:
I have a main form with navigation buttons on it and a label showing for example Record 1 of 15 using recordsetclone on it and eveything works fine. When I move through the records the record...
0
by: CSDunn | last post by:
Hello, In Access ADP's that connect to SQL Server databases, any time I have a situation where I have a combo box in a main form that looks up a record in a subform, the subform record source has...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
0
by: sneal | last post by:
A little background: We have an Access 2002 based user interface to our SQL Server 2000 database. The interface is a tabbed form with two of the tabs containing a subform. Data is pulled from the...
18
by: Robert Jacobs | last post by:
Please advise... I currently have a Mainform (Customers) and a Subform (Service Requests) with a one to many relationship (one customer, many service requests) with a CustomerID that is unique...
13
by: Mary | last post by:
I'll pulling my hair out on this one and would be so appreciative of any help. I am creating a data entry form to enter results of a student survey. There are 40 questions on the survey. The...
3
by: Richnep | last post by:
Hi all, I have tabbed subforms where I need to copy one field value from one subform over to another subform. Although I can run an update query to accomplish this I would like to do it through...
7
by: tnjarrett | last post by:
Hello, I have a MS Access continuous subform that was using a query as the recordsource. I changed it to use a recordset instead because when the query was used, the changes to the subform values...
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
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
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
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,...
1
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
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
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.