New Record?

M

Mommio2

In an Access 2003 macro, how can I check to see if the record I am working
on is new? Thanks!
 
A

Allen Browne

Test if the NewRecord property of the form is True, e.g.:
[Forms].[Form1].[NewRecord]
 
M

Mommio2

Thanks for your help! I do have one more question, please. Here are my
macro conditions:

[Forms]![2005-6 St Clem Students]![Custody]="M"
[Forms]![2005-6 St Clem Students]![Custody]="D"

The action is SetValue for each.

If I want to use [Forms].[Form1].[NewRecord] to see if it is new before the
action is done, how exactly would I word it?
(I assume that I want to substitute [2005-6 St Clem Students] for [Form1],
right?
Thanks again!


Allen Browne said:
Test if the NewRecord property of the form is True, e.g.:
[Forms].[Form1].[NewRecord]

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Mommio2 said:
In an Access 2003 macro, how can I check to see if the record I am
working on is new? Thanks!
 
A

Allen Browne

So you want the action only if both conditions are true?

The macro condition for the first one would be:

([Forms]![2005-6 St Clem Students]![Custody]="M") AND ([Forms]![2005-6 St
Clem Students].NewRecord)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Mommio2 said:
Thanks for your help! I do have one more question, please. Here are my
macro conditions:

[Forms]![2005-6 St Clem Students]![Custody]="M"
[Forms]![2005-6 St Clem Students]![Custody]="D"

The action is SetValue for each.

If I want to use [Forms].[Form1].[NewRecord] to see if it is new before
the action is done, how exactly would I word it?
(I assume that I want to substitute [2005-6 St Clem Students] for [Form1],
right?
Thanks again!


Allen Browne said:
Test if the NewRecord property of the form is True, e.g.:
[Forms].[Form1].[NewRecord]

Mommio2 said:
In an Access 2003 macro, how can I check to see if the record I am
working on is new? Thanks!
 
M

Mommio2

Thanks! I had trouble the first time I tried to use "and". This will
really help!


Allen Browne said:
So you want the action only if both conditions are true?

The macro condition for the first one would be:

([Forms]![2005-6 St Clem Students]![Custody]="M") AND ([Forms]![2005-6 St
Clem Students].NewRecord)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Mommio2 said:
Thanks for your help! I do have one more question, please. Here are my
macro conditions:

[Forms]![2005-6 St Clem Students]![Custody]="M"
[Forms]![2005-6 St Clem Students]![Custody]="D"

The action is SetValue for each.

If I want to use [Forms].[Form1].[NewRecord] to see if it is new before
the action is done, how exactly would I word it?
(I assume that I want to substitute [2005-6 St Clem Students] for
[Form1], right?
Thanks again!


Allen Browne said:
Test if the NewRecord property of the form is True, e.g.:
[Forms].[Form1].[NewRecord]

In an Access 2003 macro, how can I check to see if the record I am
working on is new? Thanks!
 
Top