If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
New record vs. old record
How do I get an auto date for new records on a form, but have previous
records refer back to the table for their date? I tried: Private Sub cboEnteredBy_AfterUpdate() If Me.NewRecord And Me.cboEnteredBy "" Then Me.txtEntryDate = Now() Else Me.txtEntryDate = "" End If End Sub in this event + the Form_Current, but it erased the dates of the previous record's txtEntryDates. Can anyone help? Thanks!!! -- GD |
#2
|
|||
|
|||
New record vs. old record
Uhmmm?
Your "Else" statement tells Access to erase any value in the txtEntryDate field if it isn't a new record? -- Regards Jeff Boyce www.InformationFutures.net Microsoft Office/Access MVP http://mvp.support.microsoft.com/ Microsoft IT Academy Program Mentor http://microsoftitacademy.com/ "GD" wrote in message ... How do I get an auto date for new records on a form, but have previous records refer back to the table for their date? I tried: Private Sub cboEnteredBy_AfterUpdate() If Me.NewRecord And Me.cboEnteredBy "" Then Me.txtEntryDate = Now() Else Me.txtEntryDate = "" End If End Sub in this event + the Form_Current, but it erased the dates of the previous record's txtEntryDates. Can anyone help? Thanks!!! -- GD |
#3
|
|||
|
|||
New record vs. old record
Exactly. So how would I word it if I wanted old records to rely on the
table's field? -- GD "Jeff Boyce" wrote: Uhmmm? Your "Else" statement tells Access to erase any value in the txtEntryDate field if it isn't a new record? -- Regards Jeff Boyce www.InformationFutures.net Microsoft Office/Access MVP http://mvp.support.microsoft.com/ Microsoft IT Academy Program Mentor http://microsoftitacademy.com/ "GD" wrote in message ... How do I get an auto date for new records on a form, but have previous records refer back to the table for their date? I tried: Private Sub cboEnteredBy_AfterUpdate() If Me.NewRecord And Me.cboEnteredBy "" Then Me.txtEntryDate = Now() Else Me.txtEntryDate = "" End If End Sub in this event + the Form_Current, but it erased the dates of the previous record's txtEntryDates. Can anyone help? Thanks!!! -- GD |
#4
|
|||
|
|||
New record vs. old record
Private Sub cboEnteredBy_AfterUpdate()
If Me.NewRecord Then If Me.cboEnteredBy "" Then Me.txtEntryDate = Now() Else Me.txtEntryDate = Null End If End If End Sub -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "GD" wrote in message ... Exactly. So how would I word it if I wanted old records to rely on the table's field? -- GD "Jeff Boyce" wrote: Uhmmm? Your "Else" statement tells Access to erase any value in the txtEntryDate field if it isn't a new record? -- Regards Jeff Boyce www.InformationFutures.net Microsoft Office/Access MVP http://mvp.support.microsoft.com/ Microsoft IT Academy Program Mentor http://microsoftitacademy.com/ "GD" wrote in message ... How do I get an auto date for new records on a form, but have previous records refer back to the table for their date? I tried: Private Sub cboEnteredBy_AfterUpdate() If Me.NewRecord And Me.cboEnteredBy "" Then Me.txtEntryDate = Now() Else Me.txtEntryDate = "" End If End Sub in this event + the Form_Current, but it erased the dates of the previous record's txtEntryDates. Can anyone help? Thanks!!! -- GD |
#5
|
|||
|
|||
New record vs. old record
Works great! Thanks for the knowledge, Doug.
-- GD "Douglas J. Steele" wrote: Private Sub cboEnteredBy_AfterUpdate() If Me.NewRecord Then If Me.cboEnteredBy "" Then Me.txtEntryDate = Now() Else Me.txtEntryDate = Null End If End If End Sub -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "GD" wrote in message ... Exactly. So how would I word it if I wanted old records to rely on the table's field? -- GD "Jeff Boyce" wrote: Uhmmm? Your "Else" statement tells Access to erase any value in the txtEntryDate field if it isn't a new record? -- Regards Jeff Boyce www.InformationFutures.net Microsoft Office/Access MVP http://mvp.support.microsoft.com/ Microsoft IT Academy Program Mentor http://microsoftitacademy.com/ "GD" wrote in message ... How do I get an auto date for new records on a form, but have previous records refer back to the table for their date? I tried: Private Sub cboEnteredBy_AfterUpdate() If Me.NewRecord And Me.cboEnteredBy "" Then Me.txtEntryDate = Now() Else Me.txtEntryDate = "" End If End Sub in this event + the Form_Current, but it erased the dates of the previous record's txtEntryDates. Can anyone help? Thanks!!! -- GD |
Thread Tools | |
Display Modes | |
|
|