Ready, steady… save!
You don’t need a chart to join in. Here are 2 ways to record your savings:
1. Cross it off
Pop a chart into your first post. Saved an amount? Cross it out! Read more »
£0.01 £0.02 £0.03
2. Write it down
Skip the chart and add updates to your first post. Read more »
“Another +£3 saved today. Go me!”
Use +£ before each new saving so it counts towards your total.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Ms Access help !!!
Midmac
Posts: 1,070 Forumite
in Techie Stuff
Ok im strugling abit with my project of making a car rental database system. Im only just starting and struggling.
I want the Yes No field to be yes if current mileage is over the mileage Limit

any one know how to do this in the validation rule?
i have tried things like " If Current Mileage > Milegae Limit then Alert=-1" but i keep getting an error. I havent a clue how to work access.
I want the Yes No field to be yes if current mileage is over the mileage Limit

any one know how to do this in the validation rule?
i have tried things like " If Current Mileage > Milegae Limit then Alert=-1" but i keep getting an error. I havent a clue how to work access.
:j Midmac Aka Crazy baby :j
0
Comments
-
You don't do this from the table - you do this through a query0
-
I think the validation rule is more for checking figures during data entry, hence you could have a validation rule on the current mileage field, when you enter the figure it can then check against the limit and display a box containing what you put in validation text.
e.g Validation rule "mileage > limit"
validation text "The mileage entered exceeds the limit"
This may be configurable as a warning so you can override and continue.
What I think you would be better with is a query, that updates your yes/no field based on the current & mileage.
You need to remember that Access is a database, and will hold entered data very well, but to manipulate it you really need to get a few queries running when certain things happen.
The query when run would compare the mileage and limit accross all your records and then change the yes/no to a yes where it exceeds the limit.0 -
You shouldn't really store the alert at all and unless the milage limit is different for every single car, you shouldn't store the milage limit at car level either.
Basically, the fact that the milage limit has been exceeded can always be calculated very easily from other data, so to store that fact is unnecessary and can lead to complications in the future.
What happens if the milage limit changes for the whole fleet / class of car / age of car / individual vehicle etc. You won't want to sweep through the whole database changing the alert.0 -
Ok ive sorted that problem. Onto the next.
I have made a subform but when i run it it opens in datasheet view rather than a Form view. I can choose to preview it as Form view but how do i make this the default. Heres a pic to explain what i mean:
:j Midmac Aka Crazy baby :j0 -
Go into the properties of the form, and change the default view to "Single Form"0
-
Cheers mobdayuk worked like a charm
:j Midmac Aka Crazy baby :j0
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 355.9K Banking & Borrowing
- 255K Reduce Debt & Boost Income
- 456.2K Spending & Discounts
- 248.4K Work, Benefits & Business
- 606.2K Mortgages, Homes & Bills
- 179.1K Life & Family
- 264K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.2K Discuss & Feedback
- 37.7K Read-Only Boards