Set the value of field

dcjones

Dereck
Local time
Today, 22:08
Joined
Mar 10, 2004
Messages
108
Hi All,

I have a form "frmMainClient" which has a field named [account_no].

I also have another form "frmJobNew" which also has a field named [account_no]

When a record is displayed on the "frmMainClient" form I want to be able to open the "frmJobNew" form "via a button" and have the [account_no] field set to the value of the [account_no] on the "frmMainClient" form.

If anyone can please advise.

Many thanks, keep safe and well.

Dereck
 
I think your looking for something like this... On your "On Click" event of your button to open your related form "New Job"

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmJobNew"
DoCmd.OpenForm stDocName, , , , acFormAdd

Forms![frmJobNew]![account_no] = Forms![ frmMainClient]![account_no]
 
Him##Thanks for your reply, it works fine. from here I can now workout my other errors and problems.

Many thank again, keep safe and well.

Dereck
 

Users who are viewing this thread

Back
Top Bottom