You can use the DateDiff and Now Functions within your query to calculate age. The Now() function basically returns the date and time from your System Clock. The DateDiff function calculates the difference between 2 dates for a given time interval (eg. years). You will therefore need to add a...
To Delete a File from a directory...
dim strFile as String
strFile = "C:\Program\Data\repair.txt"
If Dir(StrFile) Then 'Check to see if file exists
Kill strFile
End If
Hope this helps!
The code below would loop through all .bmp files in the c:\myPics directory and update the Picture property of myControl.
dim MyPath as String
dim MyName as String
dim objPicture as Object
MyPath = "c:\myPics\*.bmp"
MyName = Dir(MyPath, vbDirectory)
Do While MyName <>...
You need to you 3 tables in this circumstance
Table 1 - Drivers
*Driver ID
Driver
Table 2 - Cars
*Car ID
Car
Table 3 - Xref
*Driver ID
*Car ID
* - indicates key fields
The Cars and Drivers tables both have a one to many relationship with the Xref table.
Hope this helps!
In the design view of your make table query add the following to the criteria (against REF field)...
Not Like "*zz"
This will filter out the Titles from your query results.
Hope this helps!
Try using the Datediff function which finds the difference between 2 dates using the interval you specify. The example below would give the difference in hours ("h") between Date1 and Date2.
DateDiff("h", Date1, Date2)
Hope this Helps!
Further info on this function is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.