开发者

Prevent Access from Changing Queries

开发者 https://www.devze.com 2022-12-13 04:33 出处:网络
Microsoft Access wants to be helpful and change my queries whe开发者_运维知识库n underlying object (either form or query) does not exist.

Microsoft Access wants to be helpful and change my queries whe开发者_运维知识库n underlying object (either form or query) does not exist.

For example, if I had a query that did the following...

SELECT FirstName
FROM persons

If the persons table does not exist yet, and I import the query, Access will place an "expr: " in front of FirstName signifying that it cannot find the column. This example table will be created with VBA later.

Is there a way to prevent Access from auto-correcting queries upon import?

Thanks!


Change the query to specify the aliases

SELECT FirstName AS FirstName
FROM Persons

This will prevent MS Acces from creating an alias for you. (Stupid I know, but it works.)

0

精彩评论

暂无评论...
验证码 换一张
取 消