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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Have form Update as I type

Status
Not open for further replies.

Travis33

Programmer
Nov 20, 2000
31
US
I have a simple database with a form that I have set up that
I enter in a part number and using the after update property
will find the record. I have it set up with a combo box that as I type it fills in the rest of the string. I want it to be scrolling the rest of the text boxes that I have to as I type but it only changes the data when I finish the string in the combo box. I am wanting the textbox that has the description to be updating as I type too.

This might sound confusing but in a nutshell I want to start typing in a part number and as I type the description is changing too. So if I am not sure on the part number I can start typing and look at the description and know the part I am looking for. I have been fighting this for two weeks now and I would really like some insight to my problem
Thank You,
Travis
 
you could accomplish something like this by using the on change event
partnumber_change()
dim strsql as string, rst as recordset
dim db as database
str= sql "select * from yourtable where partnumber =" & me![partnumber] & " *"
set db = currentdb
set rst = db.openrecordset(strsql)
if rst.recordcount >=1 then
me.recordsource = strsql
else
exit sub
end if
rst.close
set db = nothing
the problem is somthing like this would cause a real performance hit on your database
the best advice would be to set the combos rowsource property to include the description and set rowcount to 2 then you could scroll thru looking for the number with the description
 
Or, in your combo box you could have both part number and description. Then click the down button and see both together. THen once you select it, the rest of the data fills in. Assuming you are looking up the data rather than trying to add to another table.

Just a thought...

Mary :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top