On the form's Current Event you can check to see if the current records is a new record.
If me.newrecord then
msgbox "This is a new record"
endif
John Ruff - The Eternal Optimist :-)
www.noclassroom.com
Let's look at your code please? What is the name of the field that is going to store the Date the record is updated?
John Ruff - The Eternal Optimist :-)
www.noclassroom.com
You will want to use Automation.
Access97 - go to http://support.microsoft.com/default.aspx?scid=kb;EN-US;q167223 (watch wordwrap) and download Auto97.exe.
Access2K - go to http://support.microsoft.com/default.aspx?scid=kb;EN-US;q260410 (watch wordwrap) and download Auto2000.exe.
AccessXP -...
In the form's Before Update you can use this code:
If me.dirty then
Updated=Now()
endif
Updated is the field in my recordsource that has the date and time an update was accomplished on the current record. If any changes are made to a record the Dirty property of the form...
Here's your code:
Sub CloseAllForms(fPrompt as boolean)
Dim dbsCurrent As Database
Dim objTmp As Object
Dim strName As String
On Error GoTo CloseAllForms_ERR
If Not fPrompt Then
DoCmd.SetWarnings False
End If
Set dbsCurrent = CurrentDb()
' Get the...
In the cbo's After Update Event add the following (I'll call the subform frmProduct_Sub)
Private Sub cbo_AfterUpdate()
frmProduct_Sub.requery
End Sub
John Ruff - The Eternal Optimist :-)
Here is code that was originally written by Ken Getz:
1. Create a new module and cut and paste this code:
Option Compare Database
Option Explicit
'This code was originally written by Ken Getz.
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it...
' Make sure you have a reference to the
' Microsoft DAO x.x Object Library
Dim filename as string
Dim filepath as string
Dim filelength as integer
' New
Dim rs as dao.recordset
------------------------------------------
' New
set rs= currentdb.openrecordset("YourTableName")...
When you step through your code, what values are
rst!Tx_Time and rstOpen!Tx_Time in the line:
DateDiff("s", rst!Tx_Time, rstOpen!Tx_Time) < 60
showing?
Actually add another variable to your code:
dim varSec as variant
Change
Case 7 To 10
If...
Writing your own code will be long and tedious. There are two excellent products I know of on the market that will do what you want, though the have their limitations.
One is from FMS (www.fmsinc.com). It called Resizer and it comes packaged as part of their "Total Access...
I believe you need to set the focus to the subform you want to do the go to next records before you can do the actual command. Then the command is
DoCmd.GoToRecord , , acNext
John Ruff - The Eternal Optimist :-)
Change the following code:
If rst!Trans_Number = 7 Or 8 Or 9 Or 10 And (DateDiff("s", rst!Tx_Time, rstOpen!Tx_Time) < 10 Then
to
Select Case rst!Trans_Number
Case 7 to 10
if DateDiff("s", rst!Tx_Time, rstOpen!Tx_Time) < 10 Then
' the rest of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.