MS Access '07中的Visual Basic? [英] Visual Basic in MS Access '07?

查看:102
本文介绍了MS Access '07中的Visual Basic?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我今天刚在我的系统上安装了MS Office Enterprise,然后直接进入MS Access。因为我熟悉Access,所以导航时遇到的问题很少。这是一个很大的问题。


Visual Basic代码在哪里???

我制作了一个表单,并在上面添加了一个Add Record按钮表格。当用户单击此按钮时,我想集中精力去表单上的第一个字段。我通常使用visual basic中的setfocus命令执行此操作。当我单击功能区上的Visual Basic图标时,会弹出Visual Basic窗口,但除了命令选项比较数据库之外根本没有代码。


发生了什么?


任何帮助都将不胜感激。

解决方案

您需要激活您的PROPERTY表。它将显示在您表单的右侧。如果它不在那里,那么右键单击你的表格,在底部你会在弹出窗口中看到单词属性。


激活你的物业表后,你选择EVENTS选项卡和然后点击ON CLICK事件中有3个点的小按钮并选择CODE BUILDER。


问候,


我今天刚在我的系统上安装了MS Office Enterprise,然后直接进入MS Access。因为我熟悉Access,所以导航时遇到的问题很少。这是一个很大的问题。


Visual Basic代码在哪里???

我制作了一个表单,并在上面添加了一个Add Record按钮表格。当用户单击此按钮时,我想集中精力去表单上的第一个字段。我通常使用visual basic中的setfocus命令执行此操作。当我单击功能区上的Visual Basic图标时,会弹出Visual Basic窗口,但除了命令选项比较数据库之外根本没有代码。


发生了什么?


任何帮助将不胜感激。


进入VB窗口没问题。当我使用向导在Access''03中放置一个按钮时,代码会自动放在该窗口的VB窗口中。当我看VB窗口时根本就没有代码。


这是我试图为cmdAdd按钮添加的简单代码:

展开 | 选择 | Wrap | 行号


我没有运行2007,但是如果我没记错的话,这个版本中的命令按钮向导会创建嵌入式宏而不是 VBA代码,您在以这种方式创建按钮后用于查找和修改。看一下本教程,看看它是否有帮助:

http://www.databasedev.co.uk/access2007macros.html


欢迎来到TheScripts!


Linq 0 GT;

I just installed MS Office Enterprise on my system today and jumped right in to MS Access. Because I am familiar with Access I had very few problems navigating around. Here is the big question.

Where is the Visual Basic Code???

I made a form and placed an Add Record button on the form. When the user clicks this button, I want to focus to go the the first field on the form. I usually do this with the setfocus command in visual basic. When I clicked on the Visual Basic icon on the ribbon, the Visual Basic window pops up, but there is no code at all except for the command Option Compare Database.

What is going on?

Any help would be appreciated.

解决方案

You need to activate your PROPERTY sheet. It will appear to the right of your form. If it is not there then RIGHT CLICK on your form and at the bottom you will see the word PROPERTIES in the popup window.

After activating your PROPERTIES sheet you then select the EVENTS tab and then click on the little button that has 3 dots in the ON CLICK event and choose CODE BUILDER.

regards,

I just installed MS Office Enterprise on my system today and jumped right in to MS Access. Because I am familiar with Access I had very few problems navigating around. Here is the big question.

Where is the Visual Basic Code???

I made a form and placed an Add Record button on the form. When the user clicks this button, I want to focus to go the the first field on the form. I usually do this with the setfocus command in visual basic. When I clicked on the Visual Basic icon on the ribbon, the Visual Basic window pops up, but there is no code at all except for the command Option Compare Database.

What is going on?

Any help would be appreciated.


I have no problem getting to the VB Window. When I used the wizard to place a button in Access ''03, there was code automatically placed in the VB Window for that control. When I look at the VB Window there is no code at all.

Here is the simple code that I am trying to put in for the cmdAdd button:


Expand|Select|Wrap|Line Numbers


I don''t run 2007, but if I remember correctly, the command button wizard in this version creates embedded macros rather than the VBA code you''re used to finding and modifying after creating a button in this manner. Take a look at this tutorial and see if it helps:

http://www.databasedev.co.uk/access2007macros.html

Welcome to TheScripts!

Linq ;0>


这篇关于MS Access '07中的Visual Basic?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆