开发者

How to update information on a table through a query?

I have phone information coming from multiple tables, colating into one query that lists all the pertinant phone information that I regularly need.

Now most of this information is coming from a export from out very old phone system. Some of it is coming from tables I created.

For instance, I created a table with every phone extension in it, and wether or not that phone extension will be listed in the directory via a query.

What I would like to be able to to, is while I am look开发者_C百科ing at the query, I would like to be able to change that Listed check box, from with-in the query. With out having to open the Listed table, and find the extension that is assciated with the person under that extension.


Sounds like you've got a union query combining the two tables with phone info in it. If that's the case, you won't be able to edit the data via the query alone. See the following link for more details on the circumstances of when you can and can't edit data in a query: http://office.microsoft.com/en-us/access-help/edit-data-in-a-query-HA010097876.aspx

If both tables have primary keys (or unique indexes) whose values could differentiate which table they came from --for instance if Table A had all keys that start with the letter 'A' or a '1', and Table B never had keys that start with the same character as Table A's keys-- then you could make a form that, depending on how you programmed it, would pop up an edit box for whichever field you designate, grab the current record's key value, determine which table the key belongs to, and then issue an update command to that table.

Personally... that's a bit too convoluted for me, and I'd probably opt for a redesign of some of the tables, possibly involving a periodic import of all pertinent data into one table that could then be updated easily. However, you of course know whether that's feasible in your situation or not.


I would create a form for this (forms are for editing data, query datasheets) are not for anything other than quick-and-dirty examination of the results of a query), rather than just using a query datasheet, for a query, you can add a lookup field.

In the QBE, right click on the field you want and choose PROPERTIES. Select the LOOKUP tab, and change the display type to Combo Box, then define the properties appropriately to display the user-friendly data you want display.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜