Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / ActiveX Controls / July 2004

Tip: Looking for answers? Try searching our database.

FAO Alex

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
K Crofts - 23 Jul 2004 15:01 GMT
Hiya Alex
Sorry to address this query to you again but you have
given me the most help so far. I have added a command
button to my form which acts as a 'go' button for my
calender control. this has stabalised my database and i
only have one problem now. When i exit my database and
save the information to my form i am unable to recall the
information to the form from the table even though the
information has definately saved on the table. I have
added my code below, any ideas?

Private Sub GoButt_Click()
If IsNull(DFirst("Date", "Table content", "Date=#" & Format
(Me.Calendar2, "dd\/mmm\/yy") & "#")) Then
   'no record. go to new record
   Me.Date.SetFocus
   DoCmd.GoToRecord , , acNewRec
   'here moved line from above
   Me.Date = Me.Calendar2.Value
Else
    'position form on record with selected date
   'Calendar2 used here:
    Me.RecordsetClone.FindFirst "Date=#" & Me.Calendar2
& "#"
    If Not Me.RecordsetClone.EOF Then
        Me.Bookmark = Me.RecordsetClone.Bookmark
    End If
End If
End Sub
Alex Dybenko - 25 Jul 2004 12:50 GMT
Hi,

try to format dates as mm/dd/yyyy:

If IsNull(DFirst("Date", "Table content", "Date=#" & Format(Me.Calendar2,
"mm\/dd\/yyyy") & "#")) Then

and here:
Me.RecordsetClone.FindFirst "Date=#" & Format(Me.Calendar2, "mm\/dd\/yyyy")
& "#"

anyway, try to debug code to see what it really doing and value variables
have

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

> Hiya Alex
> Sorry to address this query to you again but you have
[quoted text clipped - 25 lines]
>  End If
> End Sub
K Crofts - 26 Jul 2004 09:00 GMT
cheers Alex, completed that part of my project now, thanks
for all your help.
>-----Original Message-----
>Hi,
[quoted text clipped - 42 lines]
>
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.