473,397 Members | 1,974 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,397 software developers and data experts.

recordsetclone snapshot

I'm getting a "no current record" error when using the recordsetclone method in a continous forms load event. The forms recordset is set to a table name from the DB and the recordset type is set to dynamic. However, if I set the recordset type to snapshot then I do not get the error.

anyone have any clues why? I need the dynset type so I can edit the records on the form.
Jan 11 '12 #1
6 2166
NeoPa
32,556 Expert Mod 16PB
The only thing that springs to mind is that the data may be somehow locked (Check all your locking options for the database). This might explain why no records are available unless you use the snapshot type. No guarantees, but it's probably worth a check.
Jan 11 '12 #2
NeoPa thanks I'll check that out this evening. As I am new to MS Access I'm not certain how all the events work exactly but I also noticed that when I attempt to access the contents of a textbox on the form, I'm returned a null value. I am assuming that all objects and data should be available to me during the load event of the form. So what you say may actually have some merit if the records are locked than I would not be able to access any of the forms underlying data.

Does this sound correct?
Jan 11 '12 #3
NeoPa
32,556 Expert Mod 16PB
I would expect the form's Load event procedure to have access to most, if not all, the objects that are available when the form is running normally. I'm not sure exactly what to expect when you have locking issues. There are possibly even multiple situations that present differently depending on your settings. You will need to discover this by checking I'm afraid.
Jan 11 '12 #4
So I just uncovered some interesting facts but I cannot figure out why to this problem. I don't think it has anything to do with record locks. I did a quick test and have found that the issue is related to using the Docmd.openform method. When I don't use this method and just open the form the me.recordssetclone actually works for snapshot and dynaset recordsets. However, if I use the docmd.openform from another form the recordsetclone method will only work using the snapshot recordset type.

As I said though I can't figure out why?

Any thoughts?
Jan 11 '12 #5
NeoPa
32,556 Expert Mod 16PB
Not really I'm afraid.

In your position I'd check the top 5 or 6 properties of the form in Design view though. Make sure the Filter and Order By properties are both clear unless you want set values saved in (either of) them. Sometimes values are saved in here when the design is saved after applying a sort or a filter. It can't hurt to check it out.
Jan 11 '12 #6
I agree can't hurt and will check later. Thanks
Jan 11 '12 #7

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

Similar topics

8
by: Jean-Marc Blaise | last post by:
Dear all, It seems there is a problem with some snapshot table functions, if you try to divide by some element that is unset or equal to 0. This generates a trap file with the db2fmp.exe...
4
by: Civilian_Target | last post by:
Is there any way in DB2 to automate the taking of a snapshot, for example, a function that will cause a db2 snapshot to be taken every 5 minutes and written to a uniquely named file? Am I better...
13
by: Seth Spearman | last post by:
Hey guys, I have the following code: '****************************************************** If Not Me.NewRecord Then Dim rs As DAO.Recordset Dim strBookmark As String Set rs =...
3
by: Anthony Kroes | last post by:
I have a subform on a form and they are not linked. On the main form is a text box where the user types in a number. When that number changes, I have some code to make the corresponding text...
3
by: GGerard | last post by:
Hello I am trying to refer in code to the RecordsetClone of a subform datasheet but I'm getting syntax errors. This is what I am writing: Set MyDB = DBEngine.Workspaces(0).Databases(0)...
22
by: Br | last post by:
First issue: When using ADPs you no longer have the ability to issue a me.refresh to save the current record on a form (the me.refresh does a requery in an ADP). We usually do this before...
3
by: G Gerard | last post by:
Hello Can I write an SQL statement in code using a RecordSetClone of an open form? something like: MySQL = "UPDATE Me!Child0.Form.RecordSetClone SET Me!Child0.Form.RecordSetClone.MyField =...
10
by: d.francis | last post by:
I have converted an Access 97 database to Access 2003 The following code now fails and returns Run-time error '3420' Dim rst as DAO.recordset Set rst = Forms!frm1!frm2.Form.RecordsetClone I...
8
by: grant | last post by:
Hi I've copied Stephens code into my db, and can get it to work, but only on "plain Jane" reports with no images. Most of my reports has an unbound image obluect in them that I set to an...
2
imrosie
by: imrosie | last post by:
Hello, I have a search form that uses a row query to locate a customer by customerID and first & last names, so it's an unbound control. I also have two events associated with this control,...
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?
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
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
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,...

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.