Rabu, 02 Mei 2012

Re: [MS_AccessPros] Re: embedded macros

 

Hi Clive
 
It is access 2010 and yes it is an embedded macro created in the 'on exit' section of a field on a form.
 
It is quite simply a series of IF THEN  ELSEIFs designed to fill in values in other fields based on values in other fields on the same form.
 
eg (in simple form)
IF field1 = x1 then field2 = y1
ELSEIF field1 = x2 then field2 = y2
ELSEIF field1 = x3 then field2 = y3
ELSE field2 = y4
ENDIF
 
It does what I want it to do so far and all I am trying to do now is add another IF statement at the start which I have managed to do but this requires me to change the current first IF into an ELSEIF which I haven't managed to do!
 
Also, it seems quite difficult - if not impossible - to copy and paste sections of the embedded macro.
 
Any ideas?
 
cheers
 
Phil
 
 
 
 


________________________________
From: Clive <zctek@aol.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Wednesday, 2 May 2012, 11:09
Subject: [MS_AccessPros] Re: embedded macros


 

Hi Phil,

What version of Access are you using?

Do you really mean a Macro or is it VBA code?
What did you use to create it?

Please show us what you have got in your "macro"
and what you want the macro to do.

Regards, Clive

--- In MS_Access_Professionals@yahoogroups.com, "pdk444444" <pdk444444@...> wrote:
>
> Hi
>
> I have created an embedded macro in a form for the first time - basically a series of If / elseif commands.
>
> I am trying to add an outer if statement to the ones that are already there and then change the current 1st if to an elseif but I am having problems doing this.
>
> I have been able to add the outer (top) if statement but don't seem to be able to convert the next if to an elseif.
>
> help please!
>
> Phil
>

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___

Tidak ada komentar:

Posting Komentar