I'm not sure how it is possible to get the same contextmenu for an unbound form's control like for bound controls, both with a date value.
There are two unbound controls which get their control value via:
txtErsteSpende:
=Wenn([spSurrKey]>0;DomMin("[zaZahlDatum]";"[tblZahlungen]";"[zaSP_FKEY] = " & [Formulare]![frm110_Spender]![spSurrKey]);Null)
and
txtLetzteSpende:
=Wenn([spSurrKey]>0;DomMax("[zaZahlDatum]";"[tblZahlungen]";"[zaSP_FKEY] = " & [Formulare]![frm110_Spender]![spSurrKey]);Null)
Sorry for these are examples in german: "wenn" means "iif". It seems the bound control allows the context menu but not available for unbound controls.
Or is there a technique without writing vba-code to allow same context menu for both kind of controls?
Any suggestions appreciated thx
Contextmenu filter a date - bound control Contextmenu filter a date - unbound control
the goal was:
After trying around with subforms which wasn't practable because the form is displayed in data sheet view I found this solution:
qry110:
=> works fine but shows #Error in the form's textbox when in table tblZahlungen there is no entry (no ForeignKey) for the PrimaryKey in tblSpender
So I created a second query as recordsource for frm110 based on the first qry110 which checks the NULLvalue:
qry111:
It works and now the form's recordset IS updatable. Maybe the form isn't very performant for big data but it's acceptable for my users
thx for your hints
contextmenu for date textboxes