Syntax Error

bb_King

New member
Local time
Today, 16:24
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: 132
why not filter it on the subform itself using the subform's load event.
 
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.
 
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.,
 
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

Back
Top Bottom