I'd like to automatically fill in the field of a form in my database.
I've written the following query (FirstDateDogWasSighted) which returns the first date Dogs have been sighted:
SELECT TOP 1 Sightings.Date
FROM (Sightings INNER JOIN DogsatSighting ON Sightings.SightingID = DogsatSighting.SightingID) INNER JOIN Dogs ON DogsatSighting.DogID = Dogs.DogID
ORDER BY Sightings.Date;
Now I want to autopopulate a unbound field on the form with this query. In this form there is a field DogID (which is saved to the table Dogs)
I added a unbound textfield and set it to 'short date' (just like the date in table the query gets the date from).
As record source is set: =FirstDateDogWasSighted!Date
I save the form, but when I open the form the field says: #name?
Here's an example of my mdb (didn't see it in the other thread).
I'll be travelling to Africa from today, reaching my destination on Wednesday but then it probably takes a few days to set things up before I'm back on internet. But I will check back later this week.