New Update Query in Open Record question

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
 
J

John W. Vinson

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]
 
G

Guest

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]
 
G

Guest

Alas, for some reason the location field isn't taking the default value. Is
there a switch I have to turn on?
 

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