Problems in Datasheet view

H

Hiking

Hello all,

I basically have the following code inserted in my main form
(frmRunningTasks):


Private Sub Form_Dirty(Cancel As Integer)

Me!AutoRTasksLastModDate = Now()

End Sub

Private Sub subTask_History_Exit(Cancel As Integer)

Me!AutoIncidentsLastModDate = Now()

End Sub


These work fine, if I modify anything from within the main form, the
AutoRTasksLastModDate field is updated, and if I modify data in the
subform, the AutoIncidentsLastModeDate field is updated as well with the
Now() date/time stamp.

This date/time stamping is working splendid as long as I'm working from
within the Form view, but the only problem I'm having now is that I
often want to do data entry/modification from within the Datasheet view.
In Datasheet view, I have a "plus/minus" column at the very left, onto
which I click to open and close the sub-form view. The:

Private Sub subTask_History_Exit(Cancel As Integer)

Me!AutoIncidentsLastModDate = Now()

End Sub

code is causing problems... I am able to click on the plus sign to open
the sub-form, and click again to close it, but if I open the sub-form
and make any change to the data in the sub-form, I am now unable to
close the sub-form. I can change from Datasheet view to Form view, and
then change back again to Datasheet view in order to close the subform,
but then this is not an ideal solution, and this way I also lose
position within the datasheet view, it brings me back to the first record.

What can I do so's I can open/close the sub-form from within Datasheet
view even when changing data?

Any suggestions appreciated. Thanks.
 
A

Arvin Meyer [MVP]

Have a look at the Orders form of the Northwind sample database that comes
with Access. The second subform has data which changes as you scroll through
the record of the first subform. This is the way that you should be
displaying your data. Using subdatasheets will only create problems like you
now have, and will slow down your performance. AAMOF, if there are very many
records in thae database performance will slow to a crawl.
--
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