Corrupt text (asian characters)

liddlem

Registered User.
Local time
Today, 19:04
Joined
May 16, 2003
Messages
339
Hi all
Using access 2010
2 questions in one here.

I have a form where users can book a vehicle.
In order to ensure that the vehicle is not double booked, i need to run a query that compared the existing data in a table to the data in the (dirty) booking form.
Data being checked is:
VehRego
Depart (date)
DepartTime
Return (date)
ReturnTime

My query can select (and return) all this info from my table correctly, but now I want to compare the date/time fields (in my table) to the date/time fields on the form.

So when I include a dynamic field from the form field as in:

FrmDt: [Forms]![NavForm]![NavigationSubform].[Form]![Depart]
The field returns '䗀䃤'

Question 1
Is it possible to combine depart date/time into 1 field?

Question 2
How do I display the query results in English?

Thanks
 
Thanks Rural Guy
I am aware that MS stores date/time fields as 'one' - My problem is that I dont know how to display the field (Calendar with time options) to the user so that they can book a car from 2:30 PM to 4:00 PM on 1-may-2014.

As for the characters problem, I have changed the way that I structure my query, so it looks like its all good again.
 
I Have created a new DB as suggested and imported all the objects that I need.
Still getting the same problem.
NOTE: It seems like the text corruption is ONLY displaying in query results.
 
OK - So now Iv'e done a little more testing.

Tbl_TimeSlot consists of ID (AutoNumber), StartTime, EndTime

To do this, I have done the following.
Create a query that selects all the TimeSlots >= Tbl_TimeSlot.ID (This works fine)

Now I tried to add a calculated field that puts in the VehicleID (From Combo VehBooking_ID on my form.) So I added the following to the query.
Veh: [Forms]![NPYWC]![NavigationSubform].[Form]![VehBooking_ID]

The result is either an ASCII or Asian character is displayed in the query result.

However, I have found that if I
1. Put a hidden label on the form and then
2. Put an 'after update' event on the combo, so that a label is assigned the value of the combo and then
3. Point the additional query field to the label.caption, then the correct (un-corrupted) text is displayed in the query result.

Any Ideas?
 
OK - This is the last comment I intend to make on this as I am now convinced this is a MS bug.

If I run the following MAKE TABLE query from code, the output is NOT corrupt.

strSQL = "select A_TimeSlots.ID, A_TimeSlots.StartTime, A_TimeSlots.EndTime, '" & _
[Forms]![NPYWC]![NavigationSubform].[Form]![Rego] & "' as VehID,'" & _
[Forms]![NPYWC]![NavigationSubform].[Form]![VehBooking_ID] & "' as BkgID " & _
"INTO [" & cstrNewTableName & "] " & _
"FROM A_TimeSlots; "

BUT... if I run this as a stored query thus

SELECT A_TimeSlots.ID, A_TimeSlots.StartTime, A_TimeSlots.EndTime, [Forms]![NPYWC]![NavigationSubform].[Form]![Rego] AS VehID, [Forms]![NPYWC]![NavigationSubform].[Form]![VehBooking_ID] AS BkgID into AA
FROM A_TimeSlots;

The resultant table returns (apparently) CORRUPT data.

Go figure!!!
 

Users who are viewing this thread

Back
Top Bottom