dbTalk Databases Forums  

Re: Set Recordsetclone Not Working

comp.databases.ms-access comp.databases.ms-access


Discuss Re: Set Recordsetclone Not Working in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Allen Browne
 
Posts: n/a

Default Re: Set Recordsetclone Not Working - 08-05-2003 , 08:35 AM






Try:
Dim RecClone As DAO.Recordset

Details:
http://users.bigpond.net.au/abrowne1/ser-38.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to the newsgroup. (Email address has spurious "_SpamTrap")

"Mary Ann" <itm (AT) itmservices (DOT) com> wrote

Quote:
Access 2002. I am trying to make previous record and next record
command buttons work. If a user is on the first record, there is no
previous record. So, I want the previous record button disabled.

The code to accomplish this starts out:

Private Sub Form_Current()

Dim RecClone as Recordset
Set recClone=Me.RecordsetClone()
recClone.RecordCount

When I open the form, I get an error message Type Mismatch. Debug
takes me to code and highlight the Set RecClone statement. I can't
get past this to see if following code is working.

It seems like what I want to accomplish should be so easy since the
built in navigation buttons in Access enable and disable themselves.
If I knew how to write the code that says:

If this is the first record then the previous button is disabled and
if this is the last record then the next button is disabled.

What am I doing wrong? Thanks!



Reply With Quote
  #2  
Old   
TC
 
Posts: n/a

Default Re: Set Recordsetclone Not Working - 08-06-2003 , 04:22 AM







"Mary Ann" <itm (AT) itmservices (DOT) com> wrote


(snip)

Quote:
Dim RecClone as Recordset
Set recClone=Me.RecordsetClone()
Nix the brackets. RecordSetClone is a property - not a function or procedure
call.


Quote:
recClone.RecordCount
This statement is invalid & does not make any sense.

HTH,
TC




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.