开发者

Several Access Questions

during my work I accumulated some questions:

  1. I have an indep开发者_StackOverflowendent datasheet view form, how can I change its size when it is opened? For example by default it displays 5 columns and 10 rows and the form is just that big.

  2. I need to execute several sql clauses, inserts, updates and delete for example. How to use a transaction in Access to bind them together?

  3. In some situation I need to decrease a number field in a record. When this number field becomes 0, the record will be deleted or moved in another table. What I'm doing now is firstly using a SELECT clause to take the number field, then minus 1 and test, if it's 0, I do another sql clause to delete the record or move it. Any better way to do this?

  4. In the Northwind sample DB provided with Access 2007, the form-head is nice looking, but how it is done? It is a background picture or a theme?

Thanks!


  1. You really want to handle the Resize event for the form. Get its current size, and change the number of rows and columns accordingly. Change the Border Style so that the form is resizeable, if you have not already done so.

  2. In VBA, you define a transaction on the workspace, viz:

    Set wrkCurrent = DBEngine.Workspaces(0) wrkCurrent.BeginTrans ... wrkCurrent.BeginTrans

  3. You could use a VBA RecordSet object instead, if you want to be more efficient.

  4. That would be an embedded bitmap. But generally speaking Access is useless when it comes to graphics. Forget the eye candy, and keep your user interface as simple as possible.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜