GetRecord ?

  • Thread starter kubotakid via AccessMonster.com
  • Start date
K

kubotakid via AccessMonster.com

I have a Form [Order Products] I have a button that opens a form
[Products_Pivot]. I get the record number from the form [Product_Pivot] on
double click of column 0. So far so good.

What I want to do is set the record number of the main form [Order Products]
to this record number on double click variable Rval that's global

' below is the Product_Pivot form called by a button click from Order
Products form

Private Sub Form_DblClick(Cancel As Integer) '
' the code to get the currend record value. This works fine
'--------------------------
' the code below sets a text box named "getrecnum" to the record number
that works fine
Forms![Order Products].getrecnum = val(rval) & vbCr
DoCmd.Close

end sub
' below is the button on the main form [Order Products]
Private Sub Command194_Click()
DoCmd.GoToRecord acActiveDataObject, "Order Products", acGoTo, val(getrecnum)
End Sub


Now I've tried on getrecnum on update and on change to activate a button
that goes to the record but it's not working when the form Product_pivot
closes. The record number goes into the box ok on the main form but will not
goto that record number until I press the button. Any sugestions?

If the record can be changed on the main form [Order Products] directly that
would be the perfered method before closing the form [Products_Pivot] .

I hope you can follow this. Sure could use some help as I'm out of ideas.
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top