UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Searching    
 
   
bertiebowser11
post Feb 7 2005, 09:26 AM
Post #1

New Member
Posts: 3



Hi
I'm creating a database for a veterinary practice drug stock control. Basically I have an intake form of which I use a barcode scanner with keyboard wedge to input the data from a drugs barcode, into each relevant field.

For Example you blip the barcode scanner and it automatically fills in each field one after the other:

Product Code
Product Description
Batch Number
Expiry Date

This then oviously updates the drug input table with that drugs parameters.

The problem I have is when it comes to drug outtake. I need to able to create a form with the same fields as the intake but blank. So the user can open the outtake form, blip the barcode scanner which will fill those fields in and then have a search button which will then search the "batch number" field within the drug input table and bring up that batch number and drugs parameters.

I've created searches using queries, i.e. box appears asking to enter batch number which in turn brings up that drug. but this is no good as i need to be using the barcode scanner to input the details.

Can anyone help?
Go to the top of the page
 
+
ScottGem
post Feb 7 2005, 09:33 AM
Post #2

UtterAccess VIP / UA Clown
Posts: 25,041
From: LI, NY



First, It sounds like your database is not properly normalized. If I understand you, you have a products table that contains the information you listed above. You then have an intake table that you enter info in according to the barcode, and an outtake table that you want to do the same.

First, I would not have separate intake and outtake tables. I would have one transactions table with a flag that indicates whether its an intake or outtake. Second, the ONLY thing you need in this table from the products table is the Product ID as a foreign key. Anything else can be pulled from the products table using a join. If you want to display this info when scanning, you can use a subform.

As for the searching, that's easy, once you have the barcode scanned into a control or variable, you can then use that variable within a DLookup to get the Batchnumber and input that as a foreign key.

HTH
Go to the top of the page
 
+
bertiebowser11
post Feb 7 2005, 10:07 AM
Post #3

New Member
Posts: 3



I only use the one table for intake and outtake, which is (stupidly names i know) "drug intake"
Could u explain:
"you can then use that variable within a DLookup to get the Batchnumber and input that as a foreign key."

What is a DLookup?

Many Thanks
Go to the top of the page
 
+
ScottGem
post Feb 7 2005, 10:18 AM
Post #4

UtterAccess VIP / UA Clown
Posts: 25,041
From: LI, NY



If you see us mention a function or command that you don't recognize, it would help to look it up in Access help. Generally that will get you the answer. If you still have questions after reading the help, you can ask further.

DLookup is a function that will return a value from a table or query based on supplied criteria.

Also its not a good idea to use spaces in object names. You might want to take a look at naming conventions (see here).
Go to the top of the page
 
+
bertiebowser11
post Feb 7 2005, 10:22 AM
Post #5

New Member
Posts: 3



ta
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 21st May 2013 - 05:00 AM