New Update Query in Open Record question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form (12002Verify) that is being used to verify data from physical
records. The form is set on single form view. I want to be able to use a
field in the header that will provide the location data for the records we
verify. So, for each record we enter the accession info, and want the "On
Update" code to take the data from the field in the header and insert it into
a field in the current record open for editing. I know that I am showing my
age, but with FoxPro one just used the "CurrRec" function. I know there is
probably a "Focus" phrase I'm missing.

The control in the header is "OverLoc"
The field in the detail to receive the data is "Location"

Here is one of many SQL statements that didn't work:
UPDATE 12002Verify SET 12002Verify.Location = Forms!InvVerifier!OverLoc
WHERE ((CURSOR_STATUS("Local",Forms!InvVerifier!Location)=1));

Thanks again for helping...

Bill
 
I have a form (12002Verify) that is being used to verify data from physical
records. The form is set on single form view. I want to be able to use a
field in the header that will provide the location data for the records we
verify. So, for each record we enter the accession info, and want the "On
Update" code to take the data from the field in the header and insert it into
a field in the current record open for editing. I know that I am showing my
age, but with FoxPro one just used the "CurrRec" function. I know there is
probably a "Focus" phrase I'm missing.

The control in the header is "OverLoc"
The field in the detail to receive the data is "Location"

Here is one of many SQL statements that didn't work:
UPDATE 12002Verify SET 12002Verify.Location = Forms!InvVerifier!OverLoc
WHERE ((CURSOR_STATUS("Local",Forms!InvVerifier!Location)=1));

It's simpler than that. Just put a control in the detail section of the form,
bound to Location; set its DefaultValue property to

=[OverLoc]

John W. Vinson [MVP]
 
Great, Thanks. Embarrassing, in a way, but it always seems simplicity is
hard to achieve. The best programmers, like you, get there the simplest,
easiest way.

Best regards,
Bill
--
William E. Parker
IT Manager
MetalQuest



John W. Vinson said:
I have a form (12002Verify) that is being used to verify data from physical
records. The form is set on single form view. I want to be able to use a
field in the header that will provide the location data for the records we
verify. So, for each record we enter the accession info, and want the "On
Update" code to take the data from the field in the header and insert it into
a field in the current record open for editing. I know that I am showing my
age, but with FoxPro one just used the "CurrRec" function. I know there is
probably a "Focus" phrase I'm missing.

The control in the header is "OverLoc"
The field in the detail to receive the data is "Location"

Here is one of many SQL statements that didn't work:
UPDATE 12002Verify SET 12002Verify.Location = Forms!InvVerifier!OverLoc
WHERE ((CURSOR_STATUS("Local",Forms!InvVerifier!Location)=1));

It's simpler than that. Just put a control in the detail section of the form,
bound to Location; set its DefaultValue property to

=[OverLoc]

John W. Vinson [MVP]
 
Alas, for some reason the location field isn't taking the default value. Is
there a switch I have to turn on?
 
Back
Top