Syntax Error (1 Viewer)

bb_King

New member
Local time
Today, 05:40
Joined
Feb 22, 2020
Messages
1
Hi ,

I was trying to filter a subform from a mainform when opening. Any ideas ?

1617602576072.png
 

Attachments

  • 1617602605979.png
    1617602605979.png
    34.6 KB · Views: 98

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:40
Joined
May 7, 2009
Messages
19,246
why not filter it on the subform itself using the subform's load event.
 

Rene vK

Member
Local time
Today, 11:40
Joined
Mar 3, 2013
Messages
123
difficult to say what went wrong. A good idea could be to post your database so people could see what could cause this.
I read something about a error 2950 and trusted files.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:40
Joined
May 21, 2018
Messages
8,584
That syntax is wrong, should be a name of a control
tbl_transactionline_Details.....
I doubt you have a control with that name especially with a period in the name.,
 

bastanu

AWF VIP
Local time
Today, 02:40
Joined
Apr 13, 2010
Messages
1,402
Also keep in mind that the subforms load before the main form, so the value will not be there yet on Open of the main form. You can use the Current event of the main form.
With the expression the way you have it (after you correct it as per MajP) you will not apply a filter to the subform but edit the value of the transactions_line_items_ID text box to be =3.
To apply a filter:
Code:
Forms!......canditated.Form.Filter = "[Transaction_Line_Items_ID]=3"
Forms!......canditated.Form.FilterOn=True

Cheers,
 

Users who are viewing this thread

Top Bottom