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!

AutoUpdate Continuous SubForm

Status
Not open for further replies.

MCesic

Technical User
Mar 6, 2005
35
HR
Hi all!

I have Main form in Form view with just ProductID, ProductName and ProductCode. But inside I have a subform with PartName and PartNumber which is in continuous view. In subform I have an txtBox which is populated with an DLookup function and grabs number of units on store.
This all works fine, but I'd like to have autopopulation of this field when I scroll the products with main form.
Now I have to click on subforms part to trigger it's event to do "dlookup".
I saw lots of code parts for something similar but as I'm not an expert and I'm learning by myself (thanks to Tek-Tips also!) it's rather tough to investigate, reprogram and implement it.

many thanks.

greets,
Marko 9A6NCM

 
if you just 'hit' the subform after changing a record it does the dlookup?
for the current event of the mainform you could try something like:
Me!Subformname.SetFocus
Me.Parent.ProductId.SetFocus
that may do the trick
 
yes! good approach! works..
but as it is a continuous form, how can I then run through every record in subform? (this way only updates first)
I know that maybe it can be done with use of recordsets, but I've never used them before (just a little unsuccessful trying for now), so if there is some "elegant" way with VBA to do that I would be grateful for a lead.
And if it's about recordsets, then, I'll have to learn a bit I guess ;-)

thanks..

greets,
Marko 9A6NCM

 
i don't know how to manage it for the other records. i, too, am not learned in the ways of the recordset.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top