G
Guest
REposting - since haven't heard back in 4 days. Lynn are you still there??
any ideas??
Babs,
I asked in the other thread if you also have the same code in the Current
Event. The BeforeUpdate event of the form will not fire unless there is a
change. What you are describing sounds like something caused by the Current
event firing.
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
Click to show or hide original message or reply text.
Was this post helpful to you?
Reply Top
babs 5/4/2006 10:59 AM PST
Below is the only code I have on the Current event of the Form- think it
may
be this autofill not sure how to get around it.
Private Sub Form_Current()
Me![Recordnumber] = Me.CurrentRecord
Call AutoFillNewRecord([Forms]![QuoteEntryForm])
End Sub
thanks for helping
:
Click to show or hide original message or reply text.
Was this post helpful to you?
Reply Top
Keith Wilby 5/5/2006 4:30 AM PST
This line is calling another procedure. Put your cursor somewhere in
"AutoFillNewRecord", hold <SHIFT> and press <F2> to display the code - what
does it do?
Keith.
www.keithwilby.com
Was this post helpful to you?
Reply Top
babs 5/5/2006 7:03 AM PST
It is calling on the Function autofillnewrecord see below:
How can I not make it autofill just the user I guess?????
Function AutoFillNewRecord(F As Form)
Dim RS As DAO.Recordset, C As Control
Dim FillFields As String, FillAllFields As Integer
'On Error Resume Next
'Exit if not on the new record.
If Not F.NewRecord Then Exit Function
'Goto the last record of the form recordset(to auofill form).
Set RS = F.RecordsetClone
RS.MoveLast
'Exit if you cannot move to the last record(no records).
If Err <> 0 Then Exit Function
'Get the list of fields to autofill.
FillFields = ";" & F![AutoFillNewRecordFields] & ";"
'If there is no criteria field, then set flag indicating ALL
'fields should be autofilled.
FillAllFields = Err <> 0
F.Painting = False
'Visit each field on the form.
For Each C In F
'Fill The field if All fields are to be filled Or if the
'....ControlSource field can be found in the Fill Fields list.
If FillAllFields Or InStr(FillFields, ";" & (C.Name) & ";") > 0 Then
C = RS(C.ControlSource)
End If
Next
F.Painting = True
End Function
thanks
:
Click to show or hide original message or reply text.
any ideas??
Babs,
I asked in the other thread if you also have the same code in the Current
Event. The BeforeUpdate event of the form will not fire unless there is a
change. What you are describing sounds like something caused by the Current
event firing.
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
Click to show or hide original message or reply text.
When I first come back into the form and Navigate forward (1 to 2) under a
different user I can see the username is set to who put the record in.(or
who
looked at it last). Then when I navigate back it gets reset to the present
user. I don't want the username to change if a new person is just
navigating
through the records??? Any ideas.
I also posted on Security sorry if this is a problem. I know you said
about
newrecord- not sure exactly how to do that or if want to - would like it
to
catch the user if the data is modified even on an exisiting record but
don't
want it to change if record is just navigated through.
thanks,
Barb
Was this post helpful to you?
Reply Top
babs 5/4/2006 10:59 AM PST
Below is the only code I have on the Current event of the Form- think it
may
be this autofill not sure how to get around it.
Private Sub Form_Current()
Me![Recordnumber] = Me.CurrentRecord
Call AutoFillNewRecord([Forms]![QuoteEntryForm])
End Sub
thanks for helping
:
Click to show or hide original message or reply text.
Babs,
I asked in the other thread if you also have the same code in the Current
Event. The BeforeUpdate event of the form will not fire unless there is a
change. What you are describing sounds like something caused by the Current
event firing.
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
Was this post helpful to you?
Reply Top
Keith Wilby 5/5/2006 4:30 AM PST
babs said:Below is the only code I have on the Current event of the Form- think it
may
be this autofill not sure how to get around it.
Call AutoFillNewRecord([Forms]![QuoteEntryForm])
This line is calling another procedure. Put your cursor somewhere in
"AutoFillNewRecord", hold <SHIFT> and press <F2> to display the code - what
does it do?
Keith.
www.keithwilby.com
Was this post helpful to you?
Reply Top
babs 5/5/2006 7:03 AM PST
It is calling on the Function autofillnewrecord see below:
How can I not make it autofill just the user I guess?????
Function AutoFillNewRecord(F As Form)
Dim RS As DAO.Recordset, C As Control
Dim FillFields As String, FillAllFields As Integer
'On Error Resume Next
'Exit if not on the new record.
If Not F.NewRecord Then Exit Function
'Goto the last record of the form recordset(to auofill form).
Set RS = F.RecordsetClone
RS.MoveLast
'Exit if you cannot move to the last record(no records).
If Err <> 0 Then Exit Function
'Get the list of fields to autofill.
FillFields = ";" & F![AutoFillNewRecordFields] & ";"
'If there is no criteria field, then set flag indicating ALL
'fields should be autofilled.
FillAllFields = Err <> 0
F.Painting = False
'Visit each field on the form.
For Each C In F
'Fill The field if All fields are to be filled Or if the
'....ControlSource field can be found in the Fill Fields list.
If FillAllFields Or InStr(FillFields, ";" & (C.Name) & ";") > 0 Then
C = RS(C.ControlSource)
End If
Next
F.Painting = True
End Function
thanks
:
Click to show or hide original message or reply text.
babs said:Below is the only code I have on the Current event of the Form- think it
may
be this autofill not sure how to get around it.
Call AutoFillNewRecord([Forms]![QuoteEntryForm])
This line is calling another procedure. Put your cursor somewhere in
"AutoFillNewRecord", hold <SHIFT> and press <F2> to display the code - what
does it do?
Keith.
www.keithwilby.com