Hi, I have a form and made my custom buttons to enter =date() into textbox1 that is used in query criteria and would like to auto click it when form opens.
My button name is: frm_laikotarpis_current
I have to put this on form open even:
DoCmd.RunCommand frm_laikotarpis_current_Click()
but it gives me error: expected function or variable.
Also I have a 2nd problem
I have a unbound textbox2 that shows query result on same form. When I click my button manually (that sets date on unbound textbox1) the unbound textbox2 fields are not updated. I tried to add refresh button and get error: the command or action refresh isn't available now.
Tried to put my "calculated fields" on subform with refresh button and include it to main form - same error. I think it is because when you click refresh button it would clear the textbox that holds information for criteria.
Is it possible to reload refresh a subform by a button on main form, I think it would work?
My button name is: frm_laikotarpis_current
I have to put this on form open even:
DoCmd.RunCommand frm_laikotarpis_current_Click()
but it gives me error: expected function or variable.
Also I have a 2nd problem
I have a unbound textbox2 that shows query result on same form. When I click my button manually (that sets date on unbound textbox1) the unbound textbox2 fields are not updated. I tried to add refresh button and get error: the command or action refresh isn't available now.
Tried to put my "calculated fields" on subform with refresh button and include it to main form - same error. I think it is because when you click refresh button it would clear the textbox that holds information for criteria.
Is it possible to reload refresh a subform by a button on main form, I think it would work?
Last edited: