Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 15th, 2006, 02:29 PM
Authorized User
 
Join Date: Aug 2006
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi again,
  When I use the code:
Code:
rst.FindFirst ([ISBN])
[Book_Title] = rst("Book_Title")
It is giving me a run-time error, Invalid Argument. Any thoughts? It's doing it on the rst.FindFirst line.

Thanks in advance.

Arholly

 
Old December 15th, 2006, 02:47 PM
Authorized User
 
Join Date: Oct 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

rst.FindFirst calls for a string. Try creating a string variable and type

strISBN = [ISBN]
rst.FindFirst(strISBN)


That should work.

 
Old December 15th, 2006, 02:55 PM
Authorized User
 
Join Date: Aug 2006
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Same error.

 
Old December 18th, 2006, 06:32 PM
Authorized User
 
Join Date: Oct 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try picking the first ISBN and verify that the FindFirst function works. Say your ISBN is 1234, do rst.FindFirst("1234")
see if it'll bring up your entry. Also, put your ISBN in the watch window and make sure you're getting a variable. If your value is null I believe it will give you that error. Also, verify that you don't have apostrphe's. That can throw it off.
This site has code using that function, maybe looking at that will help you
http://www.databasedev.co.uk/macro_tips.html





Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling second Excel Save prompt j0hnyager VB How-To 3 November 20th, 2007 09:51 AM
command prompt karthisena BOOK: ASP.NET Website Programming Problem-Design-Solution 1 February 27th, 2007 04:11 AM
Command Prompt karthisena General .NET 2 January 25th, 2007 12:29 PM
Excel Save Prompt in javascript interrupt Javascript How-To 2 March 18th, 2005 04:52 AM
Delete Without Prompt MattLeek Excel VBA 3 March 24th, 2004 10:04 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.