Queries from ACC97 to ACCX

G

Grzegorz Rozanski

I have many queries like 'select foms!form1!datestart as Expr1, ...' which
worked fine in access97. When I do the same in AccessXP I can see nothing in
field Expr1. Or sometimes I can see 'Chinese' characters.
The problem is only when 'foms!form1!datestart' is datetime data.
Why it doesn't work in AccXP?
When I try to add 'foms!form1!datestart' to parameters it works only when
its datatype is string.


Any suggestions welcome

Thanks, Grzesiek
 
V

Van T. Dinh

Not sure whether it is a typo in the post but it should be Forms, NOT foms.

If what you posted in not your actual SQL and if you use special characters
/ space in Form / Control names, make sure you use square brackets like:

[Forms]![Form name with space]![Control name with special char ???]

In the DesignView of the Query, you can use the Menu Query / Parameters...
to declare the data type of the Parameters.
 
G

Grzegorz Rozanski

[Forms]![Form name with space]![Control name with special char ???]

Of course it's [Forms] not [forms]
In the DesignView of the Query, you can use the Menu Query / Parameters...
to declare the data type of the Parameters.

When I declare [Forms]![Form name with space]![Control name] as a text data
type parameter it works fine, but it doesn't work with date/time.
As I noticed, there is no problem with Access 2000 but there is in
Access2003

Thanks, Grzesiek
 
V

Van T. Dinh

Post the relevant details of the Table(s) and the SQL String of your Query.
It sounds like the Field used in the criteria is a Text Field rather than a
date Field.

--
HTH
Van T. Dinh
MVP (Access)



Grzegorz Rozanski said:
[Forms]![Form name with space]![Control name with special char ???]

Of course it's [Forms] not [forms]
In the DesignView of the Query, you can use the Menu Query / Parameters...
to declare the data type of the Parameters.

When I declare [Forms]![Form name with space]![Control name] as a text data
type parameter it works fine, but it doesn't work with date/time.
As I noticed, there is no problem with Access 2000 but there is in
Access2003

Thanks, Grzesiek
 
G

Grzegorz Rozanski

Table:
Pole1 long

Query:
SELECT tblTest.Pole1, [Forms]![Form1]![Tekst0] AS Wyr1
FROM tblTest;

Here is sample database in Access97:
http://members.chello.pl/g.rozanski/test.mdb

When I convert it into Access XP it doesnt work
May the problem exists only in polish version of Access? :-(

Thanks
Grzesiek
 
V

Van T. Dinh

I think in your case, the problem may related to the fact that Form1 &
Tekst0 are unbound. This seems to work:

SELECT tblTest.Pole1, [Forms]![Form1]![Tekst0].Text AS Wyr1
FROM tblTest;

Could be the Polish version too as I converted to A2K format and there are a
few things not entirely as I expected.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top