Solved

i need a special code for a Visual basic

Posted on 2001-06-07
4
170 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
Comment Utility
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
Comment Utility
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
Comment Utility
hearing...
0
 
LVL 15

Expert Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…

772 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

10 Experts available now in Live!

Get 1:1 Help Now