Record Select

J

James

Hello is there anyway to select a record from within in a
form by its data and then applying a "password" imput mask
to that one record?

Thanks

James
 
M

Mark A. Sam

The only way I would think to do it would be to place code in the
CurrentEvent of the form testing for the specified criteria, perhaps the
Record ID. It that matches, then set the InputMask of the control,
something like:

Private Sub Form_Current()

If [Id] = 12345 then
[myControl].InputMask = "!\(999)000\-0000;0;*"
Else
[myControl].InputMask = ""
End If

End Sub
 
J

James

Thanks for that but what is teh [My Control] for? do I
have to do anything there?

Thanks

James
-----Original Message-----
The only way I would think to do it would be to place code in the
CurrentEvent of the form testing for the specified criteria, perhaps the
Record ID. It that matches, then set the InputMask of the control,
something like:

Private Sub Form_Current()

If [Id] = 12345 then
[myControl].InputMask = "!\(999)000\-0000;0;*"
Else
[myControl].InputMask = ""
End If

End Sub


Hello is there anyway to select a record from within in a
form by its data and then applying a "password" imput mask
to that one record?

Thanks

James


.
 
M

Mark A. Sam

James,

I didn't know the name of the Control that you wanted to apply the input
mask to, so I used the name [myControl] as a substitution.

You also realize, I hope that "!\(999)000\-0000;0;*" is the imnput Mask for
a Phone Number. I wasn't sure without testing if = "Password" would work.

God Bless,

Mark





James said:
Thanks for that but what is teh [My Control] for? do I
have to do anything there?

Thanks

James
-----Original Message-----
The only way I would think to do it would be to place code in the
CurrentEvent of the form testing for the specified criteria, perhaps the
Record ID. It that matches, then set the InputMask of the control,
something like:

Private Sub Form_Current()

If [Id] = 12345 then
[myControl].InputMask = "!\(999)000\-0000;0;*"
Else
[myControl].InputMask = ""
End If

End Sub


Hello is there anyway to select a record from within in a
form by its data and then applying a "password" imput mask
to that one record?

Thanks

James


.
 
J

James

When you said the control what exactly do you mean? I am
just getting to grips with VBA at the moment...

Many Thanks

James
-----Original Message-----
James,

I didn't know the name of the Control that you wanted to apply the input
mask to, so I used the name [myControl] as a substitution.

You also realize, I hope that "!\(999)000\-0000;0;*" is the imnput Mask for
a Phone Number. I wasn't sure without testing if = "Password" would work.

God Bless,

Mark





Thanks for that but what is teh [My Control] for? do I
have to do anything there?

Thanks

James
-----Original Message-----
The only way I would think to do it would be to place code in the
CurrentEvent of the form testing for the specified criteria, perhaps the
Record ID. It that matches, then set the InputMask of the control,
something like:

Private Sub Form_Current()

If [Id] = 12345 then
[myControl].InputMask = "!\(999)000\-0000;0;*"
Else
[myControl].InputMask = ""
End If

End Sub


Hello is there anyway to select a record from within
in
a
form by its data and then applying a "password" imput mask
to that one record?

Thanks

James


.


.
 
M

Mark A. Sam

James,

A control is an object that you place on a form or report to input or
display data usually.

In your case it would be a Textbox or a Combobox, since you are looking to
address the input mask.

God Bless,

Mark


James said:
When you said the control what exactly do you mean? I am
just getting to grips with VBA at the moment...

Many Thanks

James
-----Original Message-----
James,

I didn't know the name of the Control that you wanted to apply the input
mask to, so I used the name [myControl] as a substitution.

You also realize, I hope that "!\(999)000\-0000;0;*" is the imnput Mask for
a Phone Number. I wasn't sure without testing if = "Password" would work.

God Bless,

Mark





Thanks for that but what is teh [My Control] for? do I
have to do anything there?

Thanks

James
-----Original Message-----
The only way I would think to do it would be to place
code in the
CurrentEvent of the form testing for the specified
criteria, perhaps the
Record ID. It that matches, then set the InputMask of
the control,
something like:

Private Sub Form_Current()

If [Id] = 12345 then
[myControl].InputMask = "!\(999)000\-0000;0;*"
Else
[myControl].InputMask = ""
End If

End Sub


message
Hello is there anyway to select a record from within in
a
form by its data and then applying a "password" imput
mask
to that one record?

Thanks

James


.


.
 
J

James

Right thanks for that...

I have the following:

If [User Name] = earl.green Then
[Password].InputMask = Password
Else
[Password].InputMask = ""
End If

and in the first line I get an error of "Object Required"
and the above line is highlighted...

Any Suggestions?

Many Thanks

James
-----Original Message-----
James,

A control is an object that you place on a form or report to input or
display data usually.

In your case it would be a Textbox or a Combobox, since you are looking to
address the input mask.

God Bless,

Mark


When you said the control what exactly do you mean? I am
just getting to grips with VBA at the moment...

Many Thanks

James
-----Original Message-----
James,

I didn't know the name of the Control that you wanted
to
apply the input
mask to, so I used the name [myControl] as a substitution.

You also realize, I hope that "!\(999)000\-0000;0;*"
is
the imnput Mask for
a Phone Number. I wasn't sure without testing if = "Password" would work.

God Bless,

Mark





Thanks for that but what is teh [My Control] for? do I
have to do anything there?

Thanks

James
-----Original Message-----
The only way I would think to do it would be to place
code in the
CurrentEvent of the form testing for the specified
criteria, perhaps the
Record ID. It that matches, then set the InputMask of
the control,
something like:

Private Sub Form_Current()

If [Id] = 12345 then
[myControl].InputMask = "!\(999)000\-0000;0;*"
Else
[myControl].InputMask = ""
End If

End Sub


message
Hello is there anyway to select a record from
within
in
a
form by its data and then applying a "password" imput
mask
to that one record?

Thanks

James


.



.


.
 
M

Mark A. Sam

IF the user name earl.green (with a dot) or earl green (with a space)

In any event you need to place quotes around the user name as well as the
Word "Password" (or any other input mask characters)


If [User Name] = "earl green" Then
[Password].InputMask = "Password"
Else
[Password].InputMask = ""
End If


This works.

God Bless,

Mark


James said:
Right thanks for that...

I have the following:

If [User Name] = earl.green Then
[Password].InputMask = Password
Else
[Password].InputMask = ""
End If

and in the first line I get an error of "Object Required"
and the above line is highlighted...

Any Suggestions?

Many Thanks

James
-----Original Message-----
James,

A control is an object that you place on a form or report to input or
display data usually.

In your case it would be a Textbox or a Combobox, since you are looking to
address the input mask.

God Bless,

Mark


When you said the control what exactly do you mean? I am
just getting to grips with VBA at the moment...

Many Thanks

James
-----Original Message-----
James,

I didn't know the name of the Control that you wanted to
apply the input
mask to, so I used the name [myControl] as a substitution.

You also realize, I hope that "!\(999)000\-0000;0;*" is
the imnput Mask for
a Phone Number. I wasn't sure without testing if
= "Password" would work.

God Bless,

Mark





message
Thanks for that but what is teh [My Control] for? do I
have to do anything there?

Thanks

James
-----Original Message-----
The only way I would think to do it would be to place
code in the
CurrentEvent of the form testing for the specified
criteria, perhaps the
Record ID. It that matches, then set the InputMask of
the control,
something like:

Private Sub Form_Current()

If [Id] = 12345 then
[myControl].InputMask = "!\(999)000\-0000;0;*"
Else
[myControl].InputMask = ""
End If

End Sub


message
Hello is there anyway to select a record from within
in
a
form by its data and then applying a "password" imput
mask
to that one record?

Thanks

James


.



.


.
 
J

James

Thanks for that with a little tweaking to my own needs it
works a treat...

Many Thanks for your assistance

James
-----Original Message-----
IF the user name earl.green (with a dot) or earl green (with a space)

In any event you need to place quotes around the user name as well as the
Word "Password" (or any other input mask characters)


If [User Name] = "earl green" Then
[Password].InputMask = "Password"
Else
[Password].InputMask = ""
End If


This works.

God Bless,

Mark


Right thanks for that...

I have the following:

If [User Name] = earl.green Then
[Password].InputMask = Password
Else
[Password].InputMask = ""
End If

and in the first line I get an error of "Object Required"
and the above line is highlighted...

Any Suggestions?

Many Thanks

James
-----Original Message-----
James,

A control is an object that you place on a form or
report
to input or
display data usually.

In your case it would be a Textbox or a Combobox, since you are looking to
address the input mask.

God Bless,

Mark


When you said the control what exactly do you mean? I am
just getting to grips with VBA at the moment...

Many Thanks

James
-----Original Message-----
James,

I didn't know the name of the Control that you
wanted
to
apply the input
mask to, so I used the name [myControl] as a substitution.

You also realize, I hope that "!\(999)000\-
0000;0;*"
is
the imnput Mask for
a Phone Number. I wasn't sure without testing if
= "Password" would work.

God Bless,

Mark





message
Thanks for that but what is teh [My Control] for?
do
I
have to do anything there?

Thanks

James
-----Original Message-----
The only way I would think to do it would be to place
code in the
CurrentEvent of the form testing for the specified
criteria, perhaps the
Record ID. It that matches, then set the
InputMask
of
the control,
something like:

Private Sub Form_Current()

If [Id] = 12345 then
[myControl].InputMask = "!\(999)000\- 0000;0;*"
Else
[myControl].InputMask = ""
End If

End Sub


"James" <[email protected]>
wrote
in
message
Hello is there anyway to select a record from within
in
a
form by its data and then applying a "password" imput
mask
to that one record?

Thanks

James


.



.



.


.
 

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