Need help w/ Requering Field

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I need some help with requering a field.

A "master field" is part of a subform and resides on a tab-controlled sheet.
On another tab, I want to reference to the same master field when entering
its children records.

In other words, if the master field contains value "123" on Tab-A then I
want to also show "123" on Tab-B. So far, this works fine via using the
method below.

Me.Parent![NameOfChildSubform].Requery


Again, when changing the value from "123" to "456" on Tab-A, I also show
"456" on Tab-B. However, updating and immediately referencing the changed
value only works on existing records.

Here's what doesn't work...

If I enter a new record and select "789" on Tab-A, then "789" will NOT show
up on Tab-B. Actually, the "referenced master field" on Tab-B is empty
after having entered the new record.

I only show the value once the form has been closed and re-opened.

Does anyone know how to immediately show the value on Tab-B once the record
has been entered on Tab-A. I hope I provided enough information to make
sense out of this problem.


Thanks in advance,
Tom
 
Set the default value of the field on tab B to =fieldname (the control name
of the field on tab A)
HTH
Kat
 
Katrina:

Thanks for the feedback... this seemed very promising... unfortunately, it
still doesn't work. I either get "#Error" or "#Name" error when opening
tab-B.

Am I doing something wrong?.... I used the following: =[tblName].[fldName]

--
Thanks,
Tom


Katrina said:
Set the default value of the field on tab B to =fieldname (the control name
of the field on tab A)
HTH
Kat
Tom said:
I need some help with requering a field.

A "master field" is part of a subform and resides on a tab-controlled sheet.
On another tab, I want to reference to the same master field when entering
its children records.

In other words, if the master field contains value "123" on Tab-A then I
want to also show "123" on Tab-B. So far, this works fine via using the
method below.

Me.Parent![NameOfChildSubform].Requery


Again, when changing the value from "123" to "456" on Tab-A, I also show
"456" on Tab-B. However, updating and immediately referencing the changed
value only works on existing records.

Here's what doesn't work...

If I enter a new record and select "789" on Tab-A, then "789" will NOT show
up on Tab-B. Actually, the "referenced master field" on Tab-B is empty
after having entered the new record.

I only show the value once the form has been closed and re-opened.

Does anyone know how to immediately show the value on Tab-B once the record
has been entered on Tab-A. I hope I provided enough information to make
sense out of this problem.


Thanks in advance,
Tom
 
yes, you do not have to put the table name or the actual field name from the
table, what you have to use is the control name.
If the control on tab A that shows the master field is called txtMaster then
the default value on your tab b should be = forms!frmname!txtMaster

try that
Kat

Tom said:
Katrina:

Thanks for the feedback... this seemed very promising... unfortunately, it
still doesn't work. I either get "#Error" or "#Name" error when opening
tab-B.

Am I doing something wrong?.... I used the following: =[tblName].[fldName]

--
Thanks,
Tom


Katrina said:
Set the default value of the field on tab B to =fieldname (the control name
of the field on tab A)
HTH
Kat
Tom said:
I need some help with requering a field.

A "master field" is part of a subform and resides on a tab-controlled sheet.
On another tab, I want to reference to the same master field when entering
its children records.

In other words, if the master field contains value "123" on Tab-A then I
want to also show "123" on Tab-B. So far, this works fine via using the
method below.

Me.Parent![NameOfChildSubform].Requery


Again, when changing the value from "123" to "456" on Tab-A, I also show
"456" on Tab-B. However, updating and immediately referencing the changed
value only works on existing records.

Here's what doesn't work...

If I enter a new record and select "789" on Tab-A, then "789" will NOT show
up on Tab-B. Actually, the "referenced master field" on Tab-B is empty
after having entered the new record.

I only show the value once the form has been closed and re-opened.

Does anyone know how to immediately show the value on Tab-B once the record
has been entered on Tab-A. I hope I provided enough information to make
sense out of this problem.


Thanks in advance,
Tom
 
Back
Top