Really, i've looked for the answer, but I must be missing some syntax somewhere...
I have a popup calendar which is to be used across several forms. Each form will need the calendar to automatically enter the selected date into the designated textbox (this part works beautifully already) and then update the filter on a continuous form to include that date range.
Now, I have several forms which will be in need of this popup calendar, so I'm trying to make it as general as possible so it can handle all of them. I set things up with a module, allowing for the following global variables:
Public target As TextBox
Public formName As Form
In the calendar form, I have the following:
So this clearly isn't right, but hopefully it will give you a sense of what I want to do in the [what goes here] space:
Call formName.afterC alendarEvents()
also doesn't work: Call formName.Form.a fterCalendarEve nts()
Each of several forms that will be using this popup calendar will need to have different "afterCalendarE vents" actions, and so I don't feel I can put it as a module. I'd like to try to access individual "afterCalendarE vents" subs in each individual form.
Does this make sense? What am I missing here? Any help is greatly appreciated. Thank you in advance.
I have a popup calendar which is to be used across several forms. Each form will need the calendar to automatically enter the selected date into the designated textbox (this part works beautifully already) and then update the filter on a continuous form to include that date range.
Now, I have several forms which will be in need of this popup calendar, so I'm trying to make it as general as possible so it can handle all of them. I set things up with a module, allowing for the following global variables:
Public target As TextBox
Public formName As Form
In the calendar form, I have the following:
Code:
Private Sub OkCal_Click()
target = Me.Calendar9.Value
target.SetFocus
DoCmd.Close , , acSaveNo
' [what goes here?]
End Sub
Call formName.afterC alendarEvents()
also doesn't work: Call formName.Form.a fterCalendarEve nts()
Each of several forms that will be using this popup calendar will need to have different "afterCalendarE vents" actions, and so I don't feel I can put it as a module. I'd like to try to access individual "afterCalendarE vents" subs in each individual form.
Does this make sense? What am I missing here? Any help is greatly appreciated. Thank you in advance.
Comment