Possible syntax problem in query to reference form field?? (1 Viewer)

BJF

Registered User.
Local time
Today, 13:27
Joined
Feb 19, 2010
Messages
133
Hi,

I think I am having trouble with the syntax in my update query.

Will someone please advise where I am making the error?
I am trying to reference a form field and i need to reference a number that is in column 2 of that field. (the field is a combobox)

The 'update to' field in my update query for a field called R1Total is the following:

[Forms]![frmRmResinNew]!R1.column(2)*[Forms]![frmRmResinNew]![PercentR1]

When i run the update query,
I am getting the error:

Undefined function '[Forms]![frmRmResinNew]!R1.column' in expression

Please help!
Thanks,
BJF
 

ECEK

Registered User.
Local time
Today, 17:27
Joined
Dec 19, 2012
Messages
717
Try pulling the value from Column (2) and into an unbound field on the form. Then refresh and reference that field.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:27
Joined
May 7, 2009
Messages
19,169
as ECEK suggest add an unbound textbox (txtCombo) on your
form. set its Visible property to No.

set its value on the AfterUpdate event of your Combo:

Private Sub combo_AfterUpdate()
Me.txtCombo = Me.combo(1)
End Sub


now on your query reference the txtCombo instead:

[Forms]![frmRmResinNew]![txtCombo] * [Forms]![frmRmResinNew]![PercentR1]
 

Users who are viewing this thread

Top Bottom