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

Updating fields when klikking on a row in a table

Status
Not open for further replies.

Larshg

Programmer
Mar 1, 2001
187
DK
I have a form that contains 2 subforms, one af witch is a table, and the other contains text fields.

I want it to update/show the data from the table in the textfields and update them when I klik on another row.

Thaks
 
Is the source of both sub forms a querry? then you can make a query using vba in the afterupdate event of the row or the lostfocus event.
Then refresh the subforms with a refresh method:
Forms("OrderForm").refresh.

I hope I understand your problem correcty.
 
Only the top subform i a querry, the other one consist of a number of textfielde it is thoes fields that i wan't to update when i klik on a row.

 
You can change the fields of lets say form2 with code running after update in form1, this is the code for it:
forms("form2").street = me.street
' if you want to see it you should refresh
forms("form2").Refresh


Hope this will help you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top