Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help needed for VBA

Status
Not open for further replies.

tecassitant

Technical User
Dec 30, 2002
32
US
hai,

i have a form called myform.now i have a table leadtb.and now in myform i have provisions for stocknumber and description these are the fields.now if the user doesnt know about the stocknumber he will enter only the description ,then according to the description it should browse and produce the results this is not a problem for me.

my problem is ,if description is entered it shows a form where we can find fields like stocknumber,group,description
now my problem is is there any way by me clicking any stocknumber from that particular form automatically fills that stocknumber into my myform(form) where i have given provision for that stocknumber.

i think i made it clear.
can this be done.
if yes please provide me with some code by which i can do
this.as i am new for access
 
Let me see if I have this straight: If you don't know the stocknumber, you type a description of the stock, then (click a button?) to open a second form which provides a list of stocks with a matching description (in a combo box? as a form with multiple records that match that description)?
And you want to click something on the second form to copy the stocknumber to the first form, right?
 
hai,

i want to click on to that stocknumber in the second form and it should be copied into my first form where i have given a textbox for stocknumber.
you got it right.

please help me if you can with some codes which will give me this.

thanks
have anice day !!!!!!!!!!!!!!!!!!!!1
 
In the Click event of the textbox in the second form that contains the stocknumber, add this code:
Dim strStockNo as string
strStockNo = Me!NameOfStockNumberTextbox.Value
Forms!NameofTheFirstForm![NameofTheFieldOnFirstForm]=strStockNo

If the names of the form to which are referring contains spaces or underscores, put those names in brackets [] too.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top