Solved

i need a special code for a Visual basic

Posted on 2001-06-07
4
172 Views
Last Modified: 2013-11-25
first of all, i would like to thank the people who will involve in this question. my problem is i have designed a library system for dubai polytechnic by database and visual basic as a (GUI). when i designed it i faced this problem that in the reservation table and in the VB form it self that two borrower can reserve the same copy at the same time. and this is not correct so, i need a code to allow only one person can reserve a copy then the specific copy will be reserved for the person. on other hand, anyone who will reserve the specific copy, there are a specific msgbox telling the perosn who want's to reserve that "not allowed the requiered copy is already reserved"
please i need soulition for this problem because i will submit this project on sunday
Best Regards
Mohammed
     
0
Comment
Question by:Faris
4 Comments
 
LVL 1

Expert Comment

by:morgan_peat
ID: 6164144
You've probably got all the reservation code & stuff sorted out, so I'm assuming that this is a quick patch.

Why not place an extra field in you 'book copy' table (or whatever it's called) to say 'reserved'.
Just make it a boolean field.  When someone reserves a copy of a book, mark this field as 'True'.
If someone tries to reserve a book, and the field is already set, say 'no'.

Just an idea...
0
 
LVL 2

Accepted Solution

by:
damienm earned 25 total points
ID: 6164195
If all books have unique id you could use something like

"update table set borrowed = true,personid=" & peronName & "where bookid = " & idval & " and borrowed = false"

"select personid where bookid=" & idval

if rs("personid") <> personName
   then msgbox "Book already booked"
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6165303
hearing...
0
 
LVL 15

Expert Comment

by:ameba
ID: 6165374
Please, maintain your other questionS!  See, now it's plural!!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Reading the Contents of a Directory In Access VBA 5 58
Updates not working for MS Windows 7 12 152
message box in access 4 41
Copy a row 12 57
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now