Complex Button Macro:

dynamite9585

Registered User.
Local time
Tomorrow, 02:59
Joined
Jul 4, 2010
Messages
34
i need a button to go on my form that displays results of a query.

i need to open a different form depending on the value of one of the fields

Ie. crstit = JNCO run JNCOfinder, crstit = SNCO run Sncofinder

there are about 5 possible results for crstit (at this stage, will be adding more when i get the hang of it)
 
had a look at that, it seemed to display a formoo with info from the previous form, not exactly what i was after.
 
In a macro you need to use the conditions column which is very similar to using IF in VBA

So you would have a "openform" action and the name of the form and then a condition like

[forms]![FormName]![FieldName] = 10 or whatever.

In VBA you have

If "whatever" Then

Do whatever

End If

With IF in VBA or macro conditions it will run through and do whichever one meets the condition.

I think I am one the very few regular posters who uses macros but if you a newer to Access and want to get information from the forum then it is best to become familiar with VBA, at least to the extent of where and how to place it, as most answers from the forum will be in VBA

VBA will also allow you to do a lot more than macros.
 
Hey Mike (sorry to hijack the thread a little) have you tried Access 2010 out yet? There is a new macro builder which is a lot like writing VBA and is nowhere near what the previous macro builder was like. It even has Intellisense.
 
No Bob, I have not even seen yet but will get it soon. I imagine it would would compare to 2007 about like Windows 7 compares to Vista
 
finally got the condition thing to work.
i was trying to link it back to the base query the form was built off, but it wanted to be linked to the form to get the result
 

Users who are viewing this thread

Back
Top Bottom