Trying to add VBA code to Access Database

farmerscott

Well-known Member
Joined
Jan 26, 2013
Messages
819
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I have just upgraded to Access as part of Office 365 (Windows 10 Pro).

Am trying to write a small piece of VBA code to update a calculated field (before I move to the next record).

1. I keep getting the following error- "Microsoft Visual Basic for Applications- File not found". Upon clicking the help button it takes me to File not found (Error 53).

2. Also where does the code go? In a module?

What am i missing?

thx.
 
Thanks Adam.

I think I am making progress based on your above suggestions.

Just as small side bar to what I am trying to achieve........ can I get a calculation to happen via a macro or data macro (before I move off a record)? Can I do it another way and not use VBA?

thx

Farmerscott
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
can I get a calculation to happen via a macro or data macro (before I move off a record)? Can I do it another way and not use VBA
YES. a lot of people put functions in the property of textboxes called *control source*. if you do something like that, you'll see the calculations happen automatically, in real time. an example of a function in this property would be:
Code:
=dcount("myfield", "mytable", "myNewField = 5")
 
Upvote 0
Hi Adam,

your suggestion to import all the tables, queries and forms into another database, worked.

I tried to delete the (phantom) form but it never gave me the option in the VBA editor. Never had this happen before.

Getting VBA back has been fantastic. Macros I could not really get my head around. It seemed to have very little functionality that I needed.

Appreciate your help.

thx

FarmerScott
 
Upvote 0

Forum statistics

Threads
1,215,491
Messages
6,125,111
Members
449,205
Latest member
ralemanygarcia

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top