Passing value to a bound control

T

tuesamlarry

I need to pass a computed value from an unbound control and pass it to a
bound control both on the same main form. (Unbound control is in form
header). Is this possible?

Our agency creates a Client ID by a concatenation of Date of Birth and last
4 digits of Social Security; last digit of year + month + day + last 4 SSN.
Numerous mistakes occur when the ID is manually created. I have this
concatenation completed in an Unbound txt box and now want to supply the
bound control for the Client ID to receive this value. Yes, I would rather
have an autonumber primary key, but we have thousands of paper files based on
the DOB+SSN system.

Unbound control is utxtClientID
Bound Control is clntClientID

Access 2007 WinXP

Thank you
 
W

Wayne-I-M

I think this may be one of the very few good times to store the results of a
calculated control (some people will disagree). It seems to be that you
could just use the calculation as and when its need but in this case >>>

Use the AfterUpdate event of the text box (or what-ever) the user is putting
the information into. Could be done in a query or form

[control A] = [control B]

I would also put a check in the code to require the information is complete
and and put in the right order etc.

If me.***** = ***** then
message ... something is wrong
else
[control A] = [control B]
 
T

tuesamlarry

Have tried several permutations on the After Update property of the
utxtClientID (the unbound column which concatenates the values from 2 other
unbound controls:

[clntClientID] = [utxtClientID]
Me.clntClientID = Me.utxtClientID
Me.clntClientID = "Me.utxtClientID"

I want to put the "created" ID text into the bound control clntClientID.
There is no effect on the bound control clntClientID. It remains blank. I do
not get any VBA syntax or other errors. Is there more to the syntax?


Wayne-I-M said:
I think this may be one of the very few good times to store the results of a
calculated control (some people will disagree). It seems to be that you
could just use the calculation as and when its need but in this case >>>

Use the AfterUpdate event of the text box (or what-ever) the user is putting
the information into. Could be done in a query or form

[control A] = [control B]

I would also put a check in the code to require the information is complete
and and put in the right order etc.

If me.***** = ***** then
message ... something is wrong
else
[control A] = [control B]


--
Wayne
Manchester, England.



tuesamlarry said:
I need to pass a computed value from an unbound control and pass it to a
bound control both on the same main form. (Unbound control is in form
header). Is this possible?

Our agency creates a Client ID by a concatenation of Date of Birth and last
4 digits of Social Security; last digit of year + month + day + last 4 SSN.
Numerous mistakes occur when the ID is manually created. I have this
concatenation completed in an Unbound txt box and now want to supply the
bound control for the Client ID to receive this value. Yes, I would rather
have an autonumber primary key, but we have thousands of paper files based on
the DOB+SSN system.

Unbound control is utxtClientID
Bound Control is clntClientID

Access 2007 WinXP

Thank you
 
D

Douglas J. Steele

Me.clntClientID = Me.utxtClientID is the appropriate syntax.

Are you sure that the code is actually firing?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


tuesamlarry said:
Have tried several permutations on the After Update property of the
utxtClientID (the unbound column which concatenates the values from 2
other
unbound controls:

[clntClientID] = [utxtClientID]
Me.clntClientID = Me.utxtClientID
Me.clntClientID = "Me.utxtClientID"

I want to put the "created" ID text into the bound control clntClientID.
There is no effect on the bound control clntClientID. It remains blank. I
do
not get any VBA syntax or other errors. Is there more to the syntax?


Wayne-I-M said:
I think this may be one of the very few good times to store the results
of a
calculated control (some people will disagree). It seems to be that you
could just use the calculation as and when its need but in this case >>>

Use the AfterUpdate event of the text box (or what-ever) the user is
putting
the information into. Could be done in a query or form

[control A] = [control B]

I would also put a check in the code to require the information is
complete
and and put in the right order etc.

If me.***** = ***** then
message ... something is wrong
else
[control A] = [control B]


--
Wayne
Manchester, England.



tuesamlarry said:
I need to pass a computed value from an unbound control and pass it to
a
bound control both on the same main form. (Unbound control is in form
header). Is this possible?

Our agency creates a Client ID by a concatenation of Date of Birth and
last
4 digits of Social Security; last digit of year + month + day + last 4
SSN.
Numerous mistakes occur when the ID is manually created. I have this
concatenation completed in an Unbound txt box and now want to supply
the
bound control for the Client ID to receive this value. Yes, I would
rather
have an autonumber primary key, but we have thousands of paper files
based on
the DOB+SSN system.

Unbound control is utxtClientID
Bound Control is clntClientID

Access 2007 WinXP

Thank you
 
T

tuesamlarry

Well I tried to "push" the value into an unbound control and that didn't work
either, so I think I am still missing some pieces on how to push a value into
another control. I have used only the AfterUpdate property of the unbound
control to set the value of [the bound control needing the value] = [the
computed unbound control].
I have used with and without brackets, and with and without " around the
unbound control value. Is there anything needed before or after the
Me.clntClientID = Me.utxtClientID? Do I need some sort of an event on the
bound control receiving the value? I can manually COPY and PASTE the computed
value into the bound control box but I would rather do it automatically.


Douglas J. Steele said:
Me.clntClientID = Me.utxtClientID is the appropriate syntax.

Are you sure that the code is actually firing?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


tuesamlarry said:
Have tried several permutations on the After Update property of the
utxtClientID (the unbound column which concatenates the values from 2
other
unbound controls:

[clntClientID] = [utxtClientID]
Me.clntClientID = Me.utxtClientID
Me.clntClientID = "Me.utxtClientID"

I want to put the "created" ID text into the bound control clntClientID.
There is no effect on the bound control clntClientID. It remains blank. I
do
not get any VBA syntax or other errors. Is there more to the syntax?


Wayne-I-M said:
I think this may be one of the very few good times to store the results
of a
calculated control (some people will disagree). It seems to be that you
could just use the calculation as and when its need but in this case >>>

Use the AfterUpdate event of the text box (or what-ever) the user is
putting
the information into. Could be done in a query or form

[control A] = [control B]

I would also put a check in the code to require the information is
complete
and and put in the right order etc.

If me.***** = ***** then
message ... something is wrong
else
[control A] = [control B]


--
Wayne
Manchester, England.



:

I need to pass a computed value from an unbound control and pass it to
a
bound control both on the same main form. (Unbound control is in form
header). Is this possible?

Our agency creates a Client ID by a concatenation of Date of Birth and
last
4 digits of Social Security; last digit of year + month + day + last 4
SSN.
Numerous mistakes occur when the ID is manually created. I have this
concatenation completed in an Unbound txt box and now want to supply
the
bound control for the Client ID to receive this value. Yes, I would
rather
have an autonumber primary key, but we have thousands of paper files
based on
the DOB+SSN system.

Unbound control is utxtClientID
Bound Control is clntClientID

Access 2007 WinXP

Thank you
 
T

tuesamlarry

Instead of assigning the value to the bound control on the AfterUpdate
property of the computed unbound control, I went to the On Enter property of
the bound control and entered: Me.clntClientID = Me.utxtClientID . Works like
I had hoped for, unless someone says putting it here may cause a problem.
Thanks to all for your time and advice. Sure appreciate it.

tuesamlarry said:
Well I tried to "push" the value into an unbound control and that didn't work
either, so I think I am still missing some pieces on how to push a value into
another control. I have used only the AfterUpdate property of the unbound
control to set the value of [the bound control needing the value] = [the
computed unbound control].
I have used with and without brackets, and with and without " around the
unbound control value. Is there anything needed before or after the
Me.clntClientID = Me.utxtClientID? Do I need some sort of an event on the
bound control receiving the value? I can manually COPY and PASTE the computed
value into the bound control box but I would rather do it automatically.


Douglas J. Steele said:
Me.clntClientID = Me.utxtClientID is the appropriate syntax.

Are you sure that the code is actually firing?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


tuesamlarry said:
Have tried several permutations on the After Update property of the
utxtClientID (the unbound column which concatenates the values from 2
other
unbound controls:

[clntClientID] = [utxtClientID]
Me.clntClientID = Me.utxtClientID
Me.clntClientID = "Me.utxtClientID"

I want to put the "created" ID text into the bound control clntClientID.
There is no effect on the bound control clntClientID. It remains blank. I
do
not get any VBA syntax or other errors. Is there more to the syntax?


:

I think this may be one of the very few good times to store the results
of a
calculated control (some people will disagree). It seems to be that you
could just use the calculation as and when its need but in this case >>>

Use the AfterUpdate event of the text box (or what-ever) the user is
putting
the information into. Could be done in a query or form

[control A] = [control B]

I would also put a check in the code to require the information is
complete
and and put in the right order etc.

If me.***** = ***** then
message ... something is wrong
else
[control A] = [control B]


--
Wayne
Manchester, England.



:

I need to pass a computed value from an unbound control and pass it to
a
bound control both on the same main form. (Unbound control is in form
header). Is this possible?

Our agency creates a Client ID by a concatenation of Date of Birth and
last
4 digits of Social Security; last digit of year + month + day + last 4
SSN.
Numerous mistakes occur when the ID is manually created. I have this
concatenation completed in an Unbound txt box and now want to supply
the
bound control for the Client ID to receive this value. Yes, I would
rather
have an autonumber primary key, but we have thousands of paper files
based on
the DOB+SSN system.

Unbound control is utxtClientID
Bound Control is clntClientID

Access 2007 WinXP

Thank you
 

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