I'm hoping someone can help with this because I have been going around in circles.
I have a bound form (frmRecordEdit) which looks up information on one form based on user entry (frmRecord) and then returns the relevant fields from the table (the fields are called lunches and cash).
I have written some code (very new to this) which clears the field on focus but then if it is blank it puts a "-" back into the field.
Private Sub Meals_GotFocus()
Meals = ""
Private Sub Meals_LostFocus()
If Meals = "" Then Meals = "-"
This works great as the Meals field is a text field but it wont work on the cash field because the data type is currency. If I change the data type to text it works fine and displays 0 but i really wanted the field to be formatted as currency.
The code for the cash field is:
Private Sub Cash_GotFocus()
Cash = ""
Private Sub Cash_LostFocus()
If Cash = "" Then Cash = "0"
Any ideas please