Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

i need a special code for a Visual basic

Posted on 2001-06-07
4
Medium Priority
?
181 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 75 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

604 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