GoControl Problem

  • Thread starter open a adobe file from a command button
  • Start date
O

open a adobe file from a command button

I'm trying to use a macro to set the focus to a control using this code:
Macro Name: No Date
Condition: IsNull([ToDaysDate])
CancelEvent
GoToControl: ToDaysDate

I get my message box but when I click 'OK' it moves on the the person first
name
 
T

tina

there's no message box in the macro posted below. how about posting the
entire macro? also, what event are you calling the macro from?

and btw, you don't need to call a function to check the value of
[ToDaysDate]. a simple conditional expression should work just as well, as

[ToDaysDate] Is Null

hth


"open a adobe file from a command button"
 
O

open a adobe file from a command button

Tina, thanks for the reply. I have a form with some input txtboxes, the
first one is ToDaysDate, I need this date to be filled out because it gets
used a little later on so on the 'on lost focus' properity of ToDaysDate I
send it to a macro called 'NoDate', the condition is 'is not
null([ToDaysDate]), the next line is a message box asking them to enter a
date, the next line is the 'GoToControl', the controlname is 'ToDaysDate',
but it goes to the next tab stop which is the person's first name. It's a 3
line macro and I don't see what I'm doing wrong

tina said:
there's no message box in the macro posted below. how about posting the
entire macro? also, what event are you calling the macro from?

and btw, you don't need to call a function to check the value of
[ToDaysDate]. a simple conditional expression should work just as well, as

[ToDaysDate] Is Null

hth


"open a adobe file from a command button"
I'm trying to use a macro to set the focus to a control using this code:
Macro Name: No Date
Condition: IsNull([ToDaysDate])
CancelEvent
GoToControl: ToDaysDate

I get my message box but when I click 'OK' it moves on the the person first
name
 
T

tina

your problem is that the LostFocus event cannot be cancelled. so the
CancelEvent action has no effect. try moving the macro to the control's Exit
event instead.

hth


"open a adobe file from a command button"
Tina, thanks for the reply. I have a form with some input txtboxes, the
first one is ToDaysDate, I need this date to be filled out because it gets
used a little later on so on the 'on lost focus' properity of ToDaysDate I
send it to a macro called 'NoDate', the condition is 'is not
null([ToDaysDate]), the next line is a message box asking them to enter a
date, the next line is the 'GoToControl', the controlname is 'ToDaysDate',
but it goes to the next tab stop which is the person's first name. It's a 3
line macro and I don't see what I'm doing wrong

tina said:
there's no message box in the macro posted below. how about posting the
entire macro? also, what event are you calling the macro from?

and btw, you don't need to call a function to check the value of
[ToDaysDate]. a simple conditional expression should work just as well, as

[ToDaysDate] Is Null

hth


"open a adobe file from a command button"
I'm trying to use a macro to set the focus to a control using this code:
Macro Name: No Date
Condition: IsNull([ToDaysDate])
CancelEvent
GoToControl: ToDaysDate

I get my message box but when I click 'OK' it moves on the the person first
name
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top