Entourage Trouble

I’m trying to get a script to work with Filemaker and entourage. It will take a due date from our FMP job bag system and put a reminder in Entourage. Unfortunately I keeping getting an error. The strange thing is that if I don’t use the date set by a variable (ie type the date in quotes directly in the script) it works fine and I’ve checked the date format coming out of FileMaker and it is identical to what I type in when it works!

Below is my simple script and the event log - if anyone can help that would be great.

Script

tell application "FileMaker Pro"
	tell database "Job Bag"
		tell current record
			set DueVar to cell "date required"
			set JobNumVar to cell "job number"
			set CustVar to cell "customer"
			set ContactVar to cell "contact"
			set JobVar to cell "job title"
			set SupplierVar to cell "supplier"
			set DateVar to DueVar & " 9:00:00 am"
		end tell
	end tell
end tell

tell application "Microsoft Entourage"
	activate
	make new event with properties {start time:DateVar, subject:JobNumVar & " " & JobVar, content:"For " & ContactVar & " - " & CustVar & ". In production with " & SupplierVar, all day event:true, remind time:2880}
end tell


Event Log

tell application "FileMaker Pro"
	get cell "date required" of current record of database "Job Bag"
		"Friday, May 6, 2005"
	get cell "job number" of current record of database "Job Bag"
		"7035"
	get cell "customer" of current record of database "Job Bag"
		"Nichols Foods Ltd"
	get cell "contact" of current record of database "Job Bag"
		"Neal Haworth"
	get cell "job title" of current record of database "Job Bag"
		"1 X Autonumis Machine lexan for AVEX - Del Monte "
	get cell "supplier" of current record of database "Job Bag"
		"smr"
end tell
tell application "Microsoft Entourage"
	activate
	make new event with properties {start time:"Friday, May 6, 2005 9:00:00 am", subject:"7035 1 X Autonumis Machine lexan for AVEX - Del Monte ", content:"For Neal Haworth - Nichols Foods Ltd. In production with smr", all day event:true, remind time:2880}
		"Microsoft Entourage got an error: Can't make some data into the expected type."

burni,

Entourage needs to know that a date is a date, not a string.

Replace this:
make new event with properties {start time:DateVar, …

with this:
make new event with properties {start time:date DateVar, …

It’s complaining that your not giving it the right type of data, a date.

Take a look at the dictionary for Entourage, in the properties for an event, you’ll see what I mean.

Brilliant - thank you Dennis.

It does make sensenow but I was putting the ‘date’ descriptor with the creation of the variable not the ‘put in entourage part’ earlier but it didn’t work.

Thanks again