Onclick open form and pass value ~ requery (1 Viewer)

YouMust

Registered User.
Local time
Today, 06:54
Joined
May 4, 2016
Messages
106
I think ive gotten myself a little lost!

I click on a field(PartClick) on a form(frmWOViewer) which open's a form frmBomViewer puts the value from PartClick into SearchBox and then requeries.

Code:
Private Sub PartClick_Click()
DoCmd.OpenForm "frmBomViewer", , , , , , [frmWOViewer].[PartClick] = " & [frmBomViewer].[searchbox]" & Me.Requery
End Sub
 

CJ_London

Super Moderator
Staff member
Local time
Today, 13:54
Joined
Feb 19, 2013
Messages
16,553
So am I, but suspect what you need is

DoCmd.OpenForm "frmBomViewer"
Forms!frmBomViewer.SearchBox=Partclick
Forms!frmBomViewer.requery

if that is not it, explain exactly what you are trying to do with examples
 

YouMust

Registered User.
Local time
Today, 06:54
Joined
May 4, 2016
Messages
106
no no, you got it spot on!

Thanks CJ once again :)
 

Users who are viewing this thread

Top Bottom