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

setting a Recordset to form with recordsetclone

Have problem getting Recordset to load from form,
would also like to know if I source a recordset from a table
and filter it, how can I load those records into an open form.



Expand|Select|Wrap|Line Numbers
  1. Private Sub Command6_Click()
  2. Dim db As DAO.Database
  3. Dim Rst As Recordset
  4.  
  5.      Me!Address.SetFocus  'this works but
  6.  
  7.      Set Rst.Source = Me.RecordsetClone
  8.             'gives error Object Variable BlockVar not set>
Dec 19 '06 #1
3 2911
MMcCarthy
14,534 Expert Mod 8TB
Have problem getting Recordset to load from form,
would also like to know if I source a recordset from a table
and filter it, how can I load those records into an open form.



Expand|Select|Wrap|Line Numbers
  1. Private Sub Command6_Click()
  2. Dim db As DAO.Database
  3. Dim Rst As Recordset
  4.  
  5.      Me!Address.SetFocus  'this works but
  6.  
  7.      Set Rst.Source = Me.RecordsetClone
  8.             'gives error Object Variable BlockVar not set>
To load recordset from a form ...

Expand|Select|Wrap|Line Numbers
  1.       Set Rst = Me.RecordsetClone
Mary
Dec 19 '06 #2
To load recordset from a form ...

Expand|Select|Wrap|Line Numbers
  1.       Set Rst = Me.RecordsetClone
Mary
Thanks On one machine this line works,
on the other one I am getting an error "type mismatch"
Could this be a problem with this particular form or just a corruption.
Dec 19 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
Thanks On one machine this line works,
on the other one I am getting an error "type mismatch"
Could this be a problem with this particular form or just a corruption.
The machine giving the type mismatch error is probably missing the DAO library. Go to Tools - References and make sure the Microsoft DAO library is ticked.

Mary
Dec 19 '06 #4

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

Similar topics

0
by: PeteCresswell | last post by:
I'm doing the bookmark thing to force the current record in a subform and it works....almost. Problem is that the subform then scrolls so that the newly-selected field is at the very top of the...
1
by: Rémi | last post by:
Hello! I have a very general question for old Access hands. I am familiar with a form's Recordset and RecordsetClone properties. In what cases do you choose to use one over the other? Are there...
5
by: Tom van Stiphout | last post by:
Hi all, I'm seeing a weird problem I'm thinking might be due to corruption. What do you think? Here is the relevant code, which is in a standard module, called from subfrmDetail's...
7
by: marmottedodue | last post by:
Hello, I'm trying to debug an access project in which two kind of recordset are used: ADODB.recordset and DAO.recordset. I'm trying to set the whole project on DAO.recordset, but the following...
1
by: mssbass | last post by:
In order to disable the previous and next buttons on my form, I followed the attached code. The buttons seem to work fine except for one thing. When the form first opens, the next button is...
2
by: Tom Clavel | last post by:
Scratching my head. I am using the filter property on a combo box .AfterUpdate event to get to a single client record. This is causing a some strange behavior: As I enter a subform, I get a no...
0
by: Bernd R. | last post by:
Hi, I am accessing an Access Database with VB.net 2005 with ADO.net. The data are displayed on a form in Text Boxes (there is no grid on the form). Now I'd like to place a ComboBox on the form...
3
rsmccli
by: rsmccli | last post by:
Access 2002 Hi. I have a command button that will "approve" all records currently being looked at by an "approver". For some reason, even though there are multiple records that exist in the...
11
by: OldBirdman | last post by:
I have a form with several bound textboxes. These are routinely updated by User. The table in RecordSource for this form currently has 8 fields not shown on this form, but which occasionally need...
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
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
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
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...
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,...
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.