Hi,
I have a form which I am trying to filter on open using:
DoCmd.OpenForm "FrmAbc", , , "[FieldA] = SomeCriteria")
I have used this many times, so am fairly comfortable with it, however, this time I need to filter where a calculated filed in the form equals some criteria. I have named the field (Field1) and tried using the name in the criteria, but it didnt work. I then tried to put the calculation in the criteria but that didnt work either
e.g.
DoCmd.OpenForm "FrmAbc", , , Left([Abc], 3) = DLookup("[NumberAbc]", "TblAbc")
I know I could put field in the source query as another field, but is there another way around it using vba?
Thank you
I have a form which I am trying to filter on open using:
DoCmd.OpenForm "FrmAbc", , , "[FieldA] = SomeCriteria")
I have used this many times, so am fairly comfortable with it, however, this time I need to filter where a calculated filed in the form equals some criteria. I have named the field (Field1) and tried using the name in the criteria, but it didnt work. I then tried to put the calculation in the criteria but that didnt work either
e.g.
DoCmd.OpenForm "FrmAbc", , , Left([Abc], 3) = DLookup("[NumberAbc]", "TblAbc")
I know I could put field in the source query as another field, but is there another way around it using vba?
Thank you