Calendar Pop-Up Error

G

Guest

I haven't done any coding in about a year, so I'm a little rusty. I re-used
code from an old project to implement a pop-up calendar. The functions are as
follows:

Private Sub ActiveXCalendar_Click()
[Date Required].Value = ActiveXCalendar.Value
[Date Required].SetFocus
ActiveXCalendar.Visible = False
End Sub

Private Sub Date_Required_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
ActiveXCalendar.Visible = True
ActiveXCalendar.SetFocus
If Not IsNull([Date Required]) Then
ActiveXCalendar.Value = [Date Required].Value
Else
ActiveXCalendar.Value = Date
End If

The calendar pops up properly, but when I select a date, I get the following
error:

Run-time error '3326'
This recordset is no updateable

Any help would be very much appreciated. Thanks! - Howard
 
J

John Welch

I'm assuming your form is based on a query. Have you checked to see if that
query is updateable? Open it in datasheet view and see if you can add a date
manually, or a new record. If not, you'll have to figure out why your query
is not updateable. Try a google or help search on 'query not updateable'.
good luck
-John
 
A

Arvin Meyer [MVP]

You can find the proper code for an activeX calendar at my website at:

http://www.datastrat.com/Download/XCalendar2K.zip

but it is much easier to use an Access form because it works everywhere and
you don't have a versioning problem (the form converts with the rest of the
database). Try this one. It works everywhere in the database, just import
the form and module, then set the control's double-click event property to:

=popCalendar()

http://www.datastrat.com/Download/Calendar2K.zip
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top