Query Form -unable to append date from calendar

optionone

Registered User.
Local time
Today, 12:41
Joined
Feb 11, 2010
Messages
56
Hi,

I've built a form based on a query that joins two tables on an ID field - the form then uses a 'search combobox' (searching on two fields) to find and display the record the user has chosen.

All the text boxes are fine and accept input but the combo boxes i've built linked to the 'Calendar Control 11 Popups' work but then dont save the date in to the combobox on picking a date.

I am sure the code is right for the comboboxes/calendars - any suggestions on what to do? The controls are all bound - would i need to unbind them and save the result with a query back in to the table?

Thanks :)
 
The combo's are bound to fields in the query? They don't have something in their control source that starts with an equals (=) sign do they?
 
The combo's are bound to fields in the query? They don't have something in their control source that starts with an equals (=) sign do they?
Hi Bob - yea the combos are bound to the fields in the query - no equals signs in the control source
 
Well, that leaves us the code for the calendar to save to the combo. Why are you saving a date to a combo instead of a text field with the calendar? That doesn't seem proper to me.
 
Well, that leaves us the code for the calendar to save to the combo. Why are you saving a date to a combo instead of a text field with the calendar? That doesn't seem proper to me.
Still rather new to access so I am probably not explaining what I mean properly - what I meant to say is that after the calendar shows up from clicking on the combo - selecting a date does not display that date in the combobox/form nor return that date to the field

Code is as follows:

Code:
Private Sub CalendarDisch_Click()
    DischDate.SetFocus
    CalendarDisch.Visible = False
 
End Sub
 
Private Sub DischDate_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    CalendarDisch.Visible = True
    CalendarDisch.SetFocus
    If Not IsNull(DischDate) Then
    CalendarDisch.Value = DischDate.Value
    Else
    CalendarDisch.Value = Date
 
End If
End Sub

CalendarDisch being the Calendar
DischDate being the combobox

Is there something wrong there? thanks
 
Why are you using MouseDown of DischDate and what is DishChDate?
 
Oh, and can you upload a screen shot or a few screenshots showing how it is all supposed to work? I'm still having a hard time picturing everything.
 

Users who are viewing this thread

Back
Top Bottom