Help needed

nur annie

lost in the rain
Local time
Tomorrow, 06:53
Joined
Sep 26, 2012
Messages
27
HI,

I left programming for about 10 years and now i am concentrating on a project for quality control. The main objective is to stored data regarding inspection activity. Currently I have 2 database, Table PRODUCT & Table Inspection Records. The fields are,
Table PRODUCT :PRODUCT CODE(primary key-number),PRODUCT NAME(text) & etc.
Table Inspection Records: JOB NO(primary key-autonumber),PRODUCT CODE(number),PRODUCT NAME(text).

Using a form name INSPECTION RECORDS which is bound to the table Inspection Records, I will key in the related information needed. Since some of the information is repeated, i would like to retrieve the PRODUCT NAME from the Table PRODUCT. I like the value to appear to unbound textbox and stored the value to the respective table for PRODUCT NAME after i've enter the PRODUCT CODE. i can't use the combo box because the list for product is quite long.

I've tried the DLookup function in the control source, but the result i'm getting at the textbox is #error. I know there a other way such as using VBA code and macro but i'm not sure at which part should i put the code and i don't really remember to write code.:banghead:
Please could someone help me. i really appreciate it.


annie
 
hi
can you attache the files so it will more easy to understand the requriement

chandra Shekar
 
As I can understand you, you don't need the same data in two tables,
(PRODUCT NAME).
I suggest to make 2 forms. Main form on the "Product" table, and subform
on "Inspection records" table. Linke them via "PRODUCT CODE" (1 > more).
In that case you dont need routine to retrieve product name from "Product" table.
 
You have PRODUCT CODE in the Inspection table; you do not need PRODUCT NAME there, too.

Set the PRODUCT CODE field in Table Inspection Records to lookup from Table PRODUCT.

Make a query that includes the fields from Table Inspection Records, including the foreign key PRODUCT CODE.

Add Table PRODUCT to the query, and add the field PRODUCT NAME and any other field you need.

Build your Inspection Records form from this query.

When you enter the Product Code into its field, the other PRODUCT fields will autofill with the data associated with that code. :)
 
i can't attach the file i don't know what is wrong with the message template (or it's me)is there any way i can deliver it to u. thanks a lot

annie
 
Last edited:
i can't attach the file i don't know what is wrong with the message template (or it's me)is there any way i can deliver it to u.

thanks a lot

annie
 
thanks buddy,
such a relief for the first time in this few days.. now i get the whole picture...

i need some brainstorming well.. need to proceed for the next stage...

thank you

annie
 

Users who are viewing this thread

Back
Top Bottom