M
Mike
HI,
I have posted this question many times but so far I
havn't got a resolution to my problem. I have used the
following to carry over the last record entered into a
table, tblBook using a Form, frmAanB:
--------------------------------------
Private Sub Combo22_AfterUpdate()
Me.Combo22.DefaultValue = """" & Me.Combo22.Value
& """"
End Sub
Private Sub Combo26_AfterUpdate()
Me.Combo26.DefaultValue = """" & Me.Combo26.Value
& """"
End Sub
Private Sub Combo46_AfterUpdate()
Me.Combo46.DefaultValue = """" & Me.Combo46.Value
& """"
End Sub
Private Sub Combo63_AfterUpdate()
Me.Combo63.DefaultValue = """" & Me.Combo63.Value
& """"
End Sub
Private Sub DateReceived_AfterUpdate()
Me.DateReceived.DefaultValue = """" &
Me.DateReceived.Value & """"
End Sub
-----------------------------------
But after doing so and carring over the last record over
successfuly to avoid re-entering records after records
and prevent redundancy and save time, my list box on the
form doesn't go to specific record when a record in the
list box is selected and also the Delete comand button
don't work. Can using the codes above have had caused
this problems?
On my form I also have a code that generate invoice
number as follow:
Private Sub Form_BeforeInsert(Cancel As Integer)
Dim rst As Recordset, db As Database
Dim lngNextNumber As Long
Set db = CurrentDb
'Open tblSeries, lock, read next number, increment,
'update and unlock.
Set rst = db.OpenRecordset("tblSeries", , dbDenyRead)
With rst
.MoveFirst
.Edit
lngNextNumber = ![NextNumber]
![NextNumber] = lngNextNumber + 1
.Update
Me.LastInvNo = ![NextNumber]
.Close
End With
Set db = Nothing
End Sub
I am lost as I have deleted and re-created the list box
and the delete cmd button many times but no result was
achived.
Please help and I thank you in advance.
Regards,
Mike
I have posted this question many times but so far I
havn't got a resolution to my problem. I have used the
following to carry over the last record entered into a
table, tblBook using a Form, frmAanB:
--------------------------------------
Private Sub Combo22_AfterUpdate()
Me.Combo22.DefaultValue = """" & Me.Combo22.Value
& """"
End Sub
Private Sub Combo26_AfterUpdate()
Me.Combo26.DefaultValue = """" & Me.Combo26.Value
& """"
End Sub
Private Sub Combo46_AfterUpdate()
Me.Combo46.DefaultValue = """" & Me.Combo46.Value
& """"
End Sub
Private Sub Combo63_AfterUpdate()
Me.Combo63.DefaultValue = """" & Me.Combo63.Value
& """"
End Sub
Private Sub DateReceived_AfterUpdate()
Me.DateReceived.DefaultValue = """" &
Me.DateReceived.Value & """"
End Sub
-----------------------------------
But after doing so and carring over the last record over
successfuly to avoid re-entering records after records
and prevent redundancy and save time, my list box on the
form doesn't go to specific record when a record in the
list box is selected and also the Delete comand button
don't work. Can using the codes above have had caused
this problems?
On my form I also have a code that generate invoice
number as follow:
Private Sub Form_BeforeInsert(Cancel As Integer)
Dim rst As Recordset, db As Database
Dim lngNextNumber As Long
Set db = CurrentDb
'Open tblSeries, lock, read next number, increment,
'update and unlock.
Set rst = db.OpenRecordset("tblSeries", , dbDenyRead)
With rst
.MoveFirst
.Edit
lngNextNumber = ![NextNumber]
![NextNumber] = lngNextNumber + 1
.Update
Me.LastInvNo = ![NextNumber]
.Close
End With
Set db = Nothing
End Sub
I am lost as I have deleted and re-created the list box
and the delete cmd button many times but no result was
achived.
Please help and I thank you in advance.
Regards,
Mike