V
venulogins
Guest
Hi frnds,
I am doing reservation system project.in the subform i have 2 textboxes one for no of tickests and one for amount owed. I wll enter the no of tickets and the amount will be calculated with code got focused of amount owed field, my problem is when i go back and change the no of tickets value the amount owed value is not changing to the new amount.the code is as fallows:
Private Sub Tickets_GotFocus()
SendKeys "^(')"
If IsNull(Me.Tickets) Then
Me.Tickets = 1
End If
End Sub
Private Sub Amount_Owed_GotFocus()
Dim TicketPrice As Currency
If IsNull(Me.Amount_Owed) Then
TicketPrice = DLookup("[TicketPrice]", "tblBreakfasts", "[Breakfast] = '" & Me.Breakfast & "'")
Me.Amount_Owed = Me.Tickets * TicketPrice
End If
End Sub
The project due in a week so please help , any sort of help is greatly appreciated.
If i'm not clear at any point above plz let me know
waiting for ur reply
thanking u
chinna
I am doing reservation system project.in the subform i have 2 textboxes one for no of tickests and one for amount owed. I wll enter the no of tickets and the amount will be calculated with code got focused of amount owed field, my problem is when i go back and change the no of tickets value the amount owed value is not changing to the new amount.the code is as fallows:
Private Sub Tickets_GotFocus()
SendKeys "^(')"
If IsNull(Me.Tickets) Then
Me.Tickets = 1
End If
End Sub
Private Sub Amount_Owed_GotFocus()
Dim TicketPrice As Currency
If IsNull(Me.Amount_Owed) Then
TicketPrice = DLookup("[TicketPrice]", "tblBreakfasts", "[Breakfast] = '" & Me.Breakfast & "'")
Me.Amount_Owed = Me.Tickets * TicketPrice
End If
End Sub
The project due in a week so please help , any sort of help is greatly appreciated.
If i'm not clear at any point above plz let me know
waiting for ur reply
thanking u
chinna