Access – Bound sub form trying to set the value of an unbound field

85 pts.
Tags:
Access Database
Access Datasheet
Microsoft Access
Microsoft Access subforms
VBA
I have a bound sub form with a Datasheet view.. One of the fields on the form I want to be unbound, but still display the value of a field for row displayed. How do I show the value.
ASKED: July 30, 2009  3:44 PM
UPDATED: August 6, 2009  3:48 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

This is not possible with a bound form. Access does not associate an unbound item with the bound record set so the result is the same value being displayed for all rows. The only way to display the value is to place the unbound field in the main form or the sub form’s header section and you need to calculate that field using the On Current event in the sub form.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TJay
    Yep, that is what I figured. Thanks!
    85 pointsBadges:
    report
  • Randym
    Could you have your subform bound to a query and calculate the "unbound" column in the query? Then that field could be bound in the form and displayed like you want.
    1,740 pointsBadges:
    report
  • TJay
    I need the field to be up datable.. I am displaying the last four digits of a credit card number - which is encrypted in the SQL Server database (linked table). When the user double clicks the cell, they get a form where they can enter a new number and it the form encrypts the string and sets it back to a hidden field on the dataview..
    85 pointsBadges:
    report
  • Randym
    So the unbound field is RIGHT(CCNumber,4)? Since you have a separate form to update the credit card number, you could update the SQL Server table directly from that form. Then you could have the RIGHT function in the bound query of the form. After the other form does the update, you could refresh the query and the last four digits would change to the new numbers.
    1,740 pointsBadges:
    report
  • TJay
    Yep. I just tried it. It works perfect! Thank you!
    85 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following