473,394 Members | 1,751 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

stop duplicate request


I will explain this situation using a scenario. Let's assumed that i'm
working on a library system where i need a loan form that will only
show books that are available for loan. In this case, this form has a
main form that shows library member's details and its subform shows the
details of the books that are loan by library member. In this subform,
one of the fields (ISBN no) displays its values using a combo box. Once
a value is selected from this combo box, values in other fields found
in the subform will be shown too. These values are based on a table
that contain books info, where only the value (ISBN no) in the combo
box comes from a query. This query will only show books that are
available for loan.

If a library member wants to borrow 'booktitle1' then this book will
not be available to be loan by other members and assumed that there is
only one 'booktitle1'.

I tried to update the field manually by changing the status field every
time the book is loan out. I hope to solve this problem in an effective
way.

I am new with access and i have difficulty to explain it in a much
better way. Sorry, if my description cause any sort of confusion.

These are the tables.
book_info (table1)
-------------------------------
bookTitle ---------- text
ISBN(pkey) ------- text
authorName ------ text
category ---------- text
dateReceived ---- date
publisher ---------- text
status -------------- text

user_info (table2)
--------------------------------
name --------------- text
userID(pKey) ------ text
address ------------ text
tel ------------------ number
hp ------------------ number
occupation -------- text
DOB --------------- date
loan_info (table3)
------------------------------
userID(fKey) ------ text
ISBN(fkey) -------- text
dateReturned ---- date
dateBorrowed ---- date
dateDue ---------- date
remarks ----------- text
Thanks.
Leah

Oct 23 '06 #1
9 1406
You could join the book_info table and the loan_info table on ISBN to get
the current UserID of the person who has a particular book checked out. Use
an outer join to get all books, but then only choose books that have a null
value for the UserID. This will give you a list of available books. Then you
shouldn't need the 'status' field (or you can keep it to show if a book is
being repaired, is missing, is circulating, etc.) Your query would look
something like this:

SELECT book_Info.ISBN from book_info left join loan_info on book_info.ISBN=
loan_info.ISBN where loan_info.UserID is null and book_info.status =
'circulating'

hope this helps
-John
"leah" <le******@yahoo.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
>
I will explain this situation using a scenario. Let's assumed that i'm
working on a library system where i need a loan form that will only
show books that are available for loan. In this case, this form has a
main form that shows library member's details and its subform shows the
details of the books that are loan by library member. In this subform,
one of the fields (ISBN no) displays its values using a combo box. Once
a value is selected from this combo box, values in other fields found
in the subform will be shown too. These values are based on a table
that contain books info, where only the value (ISBN no) in the combo
box comes from a query. This query will only show books that are
available for loan.

If a library member wants to borrow 'booktitle1' then this book will
not be available to be loan by other members and assumed that there is
only one 'booktitle1'.

I tried to update the field manually by changing the status field every
time the book is loan out. I hope to solve this problem in an effective
way.

I am new with access and i have difficulty to explain it in a much
better way. Sorry, if my description cause any sort of confusion.

These are the tables.
book_info (table1)
-------------------------------
bookTitle ---------- text
ISBN(pkey) ------- text
authorName ------ text
category ---------- text
dateReceived ---- date
publisher ---------- text
status -------------- text

user_info (table2)
--------------------------------
name --------------- text
userID(pKey) ------ text
address ------------ text
tel ------------------ number
hp ------------------ number
occupation -------- text
DOB --------------- date
loan_info (table3)
------------------------------
userID(fKey) ------ text
ISBN(fkey) -------- text
dateReturned ---- date
dateBorrowed ---- date
dateDue ---------- date
remarks ----------- text
Thanks.
Leah

Oct 23 '06 #2
Thanks for the reply.

If the problem is not in the query part, what else can i do about that.

What i encountered is i need to close the loan form before it can
update the data (details about books that are available for loan). It's
like i have to close the form and reopen it again,
then the book that is loan out will not be shown in the combo box.

Thanks.
leah_603

Oct 28 '06 #3
Leah,

"ISBN" makes me think you are french like me. For me, you could create a
query that select the books that are availiable for loan. Then you could
use a RechDom function to know if a book is availiable or use this query as
a source of a form that shows theese books.

"leah" <le******@yahoo.coma écrit dans le message de news:
11*********************@i42g2000cwa.googlegroups.c om...
Thanks for the reply.

If the problem is not in the query part, what else can i do about that.

What i encountered is i need to close the loan form before it can
update the data (details about books that are available for loan). It's
like i have to close the form and reopen it again,
then the book that is loan out will not be shown in the combo box.

Thanks.
leah_603

Oct 29 '06 #4

Thanks for the reply.
I did that but still the problem exist.
The form could not update the data in the combo box instantaneously,
except after closing the form.

Leah

Oct 30 '06 #5
Did you try the update command or sendkey ctrl + ' after modifiying ?
"leah" <le******@yahoo.coma écrit dans le message de news:
11**********************@m73g2000cwd.googlegroups. com...
>
Thanks for the reply.
I did that but still the problem exist.
The form could not update the data in the combo box instantaneously,
except after closing the form.

Leah

Oct 30 '06 #6

Maybe i didn't. Would you mind to explain more about that?
Where should i place it (the update command)?

Thanks.

leah

Oct 31 '06 #7
I tried this thing :

On the property "On clic" of the combo box : a macro with Execute command
"actualize" or an event procedure : DoCmd.RunCommand acCmdRefresh then the
request that feed the combo box is run and the list of choise is update.

It works for me on a data base i build like yours.

Alain
"leah" <le******@yahoo.coma écrit dans le message de news:
11*********************@e64g2000cwd.googlegroups.c om...
>
Maybe i didn't. Would you mind to explain more about that?
Where should i place it (the update command)?

Thanks.

leah

Oct 31 '06 #8

Thanks for telling me that, Alain. I think that will work.
I'm going to try that out.

Thanks again.

leah

Nov 4 '06 #9

Thanks again Alain.
After trying a few times, it really works.
Many thanks.

leah

Nov 4 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Zunbeltz Izaola | last post by:
Hi, I have a wxPython application that call makes a thread (with threading module). In some moment i've to stop the thread but i need to finish a funtion in the thread before it can stop. How...
1
by: monika | last post by:
hi... when I try to insert a duplicate record I get the primary key error. which is good. but I want to generate a user friendly error ... telling the user that u have got this error because u r...
3
by: David | last post by:
Hi, I have a page which lets me select a user from a list by checking a check box next to the specific user and pressing a submit button. The Check box holds the value = 'UserID'. A new form...
6
by: nick4soup | last post by:
I have read the CGI FAQ 'How can I avoid users hitting "submit" twice' (on http://www.htmlhelp.org/faq/cgifaq.3.html#19 ) which essentially says you have to detect it at the server, using a...
0
by: Suler Abou | last post by:
Hi, I'm having a problem with an SQL statement, I have a statement that goes like this: "INSERT INTO table VALUES('TransID','CID',etc...);" it basically adds new data to a table. When the...
44
by: Jeff | last post by:
Hi I have a library mde that is used with some customer databases and I found out that another developer discovered it while doing some maintenance work on an old database for the same customer...
8
by: Iona | last post by:
Hi Allan, I'm using a nifty piece of code you put on here some time back to do a duplicate entry check as below. I'm using to check for duplicate names. However I am getting an error message on...
2
by: Harry Haller | last post by:
I want to duplicate the form data, edit it to remove some items (such as __EVENTTARGET, __EVENTVALIDATION, etc) and save it to a log. How can I make a duplicate (editable) copy of the Form...
7
by: Marc Bartsch | last post by:
Hi, I have a background worker in my C# app that makes a synchronous HttpWebRequest.GetResponse() call. The idea is to POST a file to a server on the internet. When I call HttpWebRequest.Abort()...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.