Jump to content

Recommended Posts

Ok i'm not sure if this is complex or not (I hope not). In MS access 2007, I am creating a library database system, with members forms, book forms and issue forms.

 

When adding a book into the book table There is a check box called 'onShelf' which speaks for itself, if it is checked it is on the shelf, if not... then it isn't.

 

Now when this box is uncheck it won't be avaliable in the list of books that are able to be issued. (with me so far.. hope so).

 

Ok now when i issue a book i have another check box called 'Issued'. When this is checked it means the book is issued. When i check this box what i want the VBA code to do is uncheck the 'onShelf' checkbox making the book unavaliable in the list.

 

So the vba code i really need help with is

 

Private Sub issued_AfterUpdate()
   Dim SQLUpdate As String
   SQLUpdate = "UPDATE tbl.book SET onShelf=false WHERE bookID=_BOOKIDHERE_;"
   DoCmd.RunSQL SQLUpdate
End Sub

 

When i run this code i get the error

 

Run-Time error '3024':

 

Could not find path\to\documents\tbl.mdb

 

 

Any help would be great. Thanks

 

 

Link to comment
https://forums.phpfreaks.com/topic/109863-access-vba-confusion/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.