Access 2010 Macro designer

SonicClang

Registered User.
Local time
Today, 17:14
Joined
Oct 14, 2008
Messages
16
...is idiotic, dumb, backwards, hardly usable, dumbed down, and I hate it...

Having said that, I'm trying to learn to use it because so many of the wizards Access uses now builds macros in the Macro Designer. It will eventually be to my benefit to understand it. I still very much prefer VBA at this point.

My current problem is that I can't set the value of a field to blank. In VBA you'd simply type me.cboComboBox = "". Well, if you type "" in the Macro builder for the value of a field in a form, it LITERALLY puts "" in the field, instead of clearing it. If I leave the "value" field blank in the Macro Designer, Access gives me an error about not being able to put a null value in the text box. I tried a space and it does the same thing.

Something that's so simple in VBA is turning into a major headache with this new Macro Designer. I'd appreciate any help anyone can give me.
 
...is idiotic, dumb, backwards, hardly usable, dumbed down, and I hate it...
Well, we gather you hate it, but your statement about it being idiotic, dumb, backwards, hardly usable and dumbed down is, in my opinion, bulls...

I think it is much closer to VBA than it used to be. So, it isn't "dumbed down" at all. In fact it is much more powerful than the previous macro writer was. I believe that change to something radically different is your source of frustration and hatred.

My current problem is that I can't set the value of a field to blank. In VBA you'd simply type me.cboComboBox = "". Well, if you type "" in the Macro builder for the value of a field in a form, it LITERALLY puts "" in the field, instead of clearing it. If I leave the "value" field blank in the Macro Designer, Access gives me an error about not being able to put a null value in the text box. I tried a space and it does the same thing.

Something that's so simple in VBA is turning into a major headache with this new Macro Designer. I'd appreciate any help anyone can give me.

I can see why you're frustrated. So, the first question is - is this a Web App? If not, then why not just use VBA since you're obviously more familiar with it.

As for the syntax, I would have to pull out my netbook with 2010 on it to verify any answer I might give (as I don't use it very much yet - I'm still stuck in 2003 world at work), so perhaps someone who has done more with it can answer now, otherwise I'll get back to you.
 
Did you try this:

Code:
=""

(e.g. prepending an equal sign in front of the "")
 
="" didn't work. Access gives me the same error as if I put a space in the value field.

This is just an Access database with a front-end for my users.

I usually do use VBA to do this stuff but I'm trying to learn. But if it's incapable of doing what I can normally do in VBA, then it's not an equal tool.
 
But if it's incapable of doing what I can normally do in VBA, then it's not an equal tool.

Ummm, macros never have been as powerful as VBA and still are not. But macros are the only thing you can use for WEB database objects. For all non web apps VBA is still the way people can go. There are no plans to eliminate VBA, it is just that macros are necessary in Web World.
 
And by "Web" do you mean for SharePoint or internal sites?

I was under the impression that Microsoft was trying to push Macros as a replacement for VBA, considering the "Convert Form's Macros to Visual Basic" function doesn't work.
 
And by "Web" do you mean for SharePoint or internal sites?
Any web type operation where you are going to be using a browser. So both of those.

I was under the impression that Microsoft was trying to push Macros as a replacement for VBA, considering the "Convert Form's Macros to Visual Basic" function doesn't work.

Nope, not a replacement for VBA. I'll have to run a test with mine but I thought I remembered using the Convert from macro to VB function before there.
 
Well, I should point out that even in a traditional file, you still have to use macro designer to build triggers & stored procedures which I would prefer over even VBA simply by the virtue that it's access-independent (access as a verb, not as a noun). But Bob's right that VBA isn't going away anytime soon (if they really wanted to get rid of it they wouldn't have had provided a 64-bit VBA. Upgrading VBA to work in 64-bit only environment is certainly no trivial task).

I think macro designer really has made some great strides and can see uses for where I want some quick'n'easy actions that doesn't really need customization that VBA can offer.

But I digress.

Can I please see your macro? To paste your macro, select all, copy, then paste it here in the [code][/code]

The output would look like this:

Code:
<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<UserInterfaceMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application"><UserInterfaceMacro MinimumClientDesignVersion="14.0.0000.0000"><Statements><Action Name="SetProperty"><Argument Name="ControlName">foo</Argument><Argument Name="Property">Value</Argument><Argument Name="Value">=""</Argument></Action></Statements></UserInterfaceMacro></UserInterfaceMacros>
 
="" didn't work. Access gives me the same error as if I put a space in the value field.

This is just an Access database with a front-end for my users.

I usually do use VBA to do this stuff but I'm trying to learn. But if it's incapable of doing what I can normally do in VBA, then it's not an equal tool.

I just did a test on 2010 setting a bound combo box to "" and it came out just fine.

So, is this the way your macro looks?

attachment.php
 

Attachments

  • macrosetvalue.png
    macrosetvalue.png
    4.4 KB · Views: 4,007
Bob -

Just to be sure... I don't think SetValue is one of web macros? I used SetProperty macro (see my previous post above which contains the XML - you can paste it back into the macro as well)

I tested this with an unbound text field and it seemed to work OK.
 
After you guys said the Macro Designer isn't a replacement for VBA I decided to do what I needed in VBA. I don't think we're going to be doing web apps anytime soon, and it's definitely not needed for my current project.

I don't see a SetValue command. Maybe next time I'll try that.

Bob, my code looked exactly like yours and my combo box came out with "" as a value instead of a blank field.
 
SetProperty
Control name <specify control name>
Property: Value
Value:

Leave it blank do not write anything, no quotes, no nothing.
 

Users who are viewing this thread

Back
Top Bottom