some problems with my program

grad2009

Registered User.
Local time
Today, 02:56
Joined
Feb 7, 2010
Messages
30
hello guys,

I have done stock program in Microsoft access. I created a table with name Items. That table contains itemNo (the primary key). , itemDesc. , unit , and price attributes. Also I created a table with name Sales which contains sales's invoice No (sInvoiceNo) (the primary key), date, itemNo, quantity and total price attributes. Then I created a form which contains sInvoiceNo, date, itemNo, quantity, total price form Sales table and itemDescription, unit, price from the Item table. So when I enter the itemNo in that form , the related information such as (itemDesc, unit, price ) appears automatically (without user) but by this way it is more difficult for the user to remember all of the items Numbers. I tried to enter the itemDesc instead of itemNo but here the related information such as (itemNo, unit and price) don't appear automatically, it needs to fill by users.
Now , my question is I want the related information appears automatically when I enter the iemDesc instead of itemNo

can you help me please and i would be so thankful for you

I'm looking forward to hearing from you,
thanks with regards,
 
In general, when dealing with an "auto fill" situation, the rule of thumb is that when you provide the information that should lead you to the record holding that auto fill data, you must have control names on your form that match the field names in that record. Access will "assume" (correctly or incorrectly) that the controls and fields are somehow related and will do the auto-fill. Note also that the label on the control has nothing to do with its actual name. You can rename the control (if that is what is needed) from the properties sheets for the control. Note that it really doesn't matter if the RecordSource property points to the right value in the record. It is the control's name that matter for the auto-fill to work right. (Or at least, that is the way it was last time I diddled with such a thing.)
 

Users who are viewing this thread

Back
Top Bottom