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...
You can use the Enabled property and the Tag property of those fields affected.
For those fields on the form that must be enabled when the user selects the Project or Program combobox, place the word "Program,Project" in the Tag property of each control. For those fields that must...
Since you already have a function, UserName, why not pull the "User from the function" instead of the "LogOnName"? John Ruff - The Eternal Optimist :-)
I see a need for three tables here.
Your Songs table, your History table (modified), and an Events table.
Your History table would only carry the Songs Selected ID and the Events ID (you could also have a HistoryID which would be an autoincrement field). This table is commonly called a...
Here's code for selecting a file or a directory
Code for selecting a file
Private Sub cmdFileDialog_Click()
' Requires reference to Microsoft Office 10.0 Object Library.
' Select a file
Dim fDialog As Office.FileDialog
Dim varFile As Variant
'Clear listbox contents...
There are two common problems. 1. Your users are using different screen resolutions than what you developed the form in; and/or 2. You are using Form Headers/Footers and the footer's height is too high.
If you developed the form in a resolution of 1024x768 but you have users whose screen...
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.