Results 1 to 8 of 8
  1. #1
    Buakaw is offline Absolute novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    112

    Need help with data display

    I have a form with a text box. The control source of this text box is fkPaymentMethod.

    fkPaymentMethod is a number stored in table tblPaymentDetails.

    fkPaymentMethod is actually a foreign key from another table called tblPaymentMethod.

    Fields of tblPaymentMethod are:

    Autonumber Text
    ----------- -----
    PrimaryKey PaymentMethod

    It's data contains:
    1 Cash
    2 Cheque
    3 Automated Bank Transfer

    I want my text box on my form (with control source as fkPaymentMethod) to display as "Cash", "Cheque" and so on, instead of "1", "2" and so on.

    Does anyone know how I can do this? Thanks.

  2. #2
    PrintShopSup is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2010
    Posts
    11
    The control source should be query of tblPaymentDetails. Set the Bound Column of the control source to 2.

    Edit.
    You would have to change the text box to a list box. Sorry.
    Last edited by PrintShopSup; 03-11-2011 at 04:53 AM. Reason: Cant make the source of a text box a query.

  3. #3
    Buakaw is offline Absolute novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    112
    This text box is for display purposes only. It is to display past transactions, so for that reason I don't want to use a combobox, because it's not supposed to be editable.

    Anyone please?

  4. #4
    thhui is offline Competent Performer
    Windows XP Access 2002
    Join Date
    Feb 2009
    Posts
    235
    You can set combobox to be locked (not editable).

  5. #5
    PrintShopSup is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2010
    Posts
    11
    I'm wondering what is the control source of the entire form. Perhaps you could create a query "joining" the Payment Method to the foreign key. Then use that as teh control source of the form. This would alow you to set the text box to the Payment Method field from the query.

    Make sense?

  6. #6
    thhui is offline Competent Performer
    Windows XP Access 2002
    Join Date
    Feb 2009
    Posts
    235
    RecordSource or RowSource is related to Query, SQL, or Table
    while
    ControlSource is related to fieldName under the RecordSource or RowSource or
    control source could be referred to other fieldExpressions.

    Form could only have RecordSource Option and no ControlSource Option.

    ComboBox could have RowSource Option for setting the SQL Source

  7. #7
    Buakaw is offline Absolute novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    112
    Thanks everyone. The control source of the form is a query. I'll try out the different options and report back.

  8. #8
    Buakaw is offline Absolute novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    112
    Yay! It works! I ended up using PrintShopSup's idea. Learned something new, thanks everyone!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Subform won't display data
    By bobn3faw in forum Forms
    Replies: 1
    Last Post: 02-10-2011, 09:55 PM
  2. Display data from month x-1 and x-2
    By donodarazao in forum Reports
    Replies: 5
    Last Post: 11-06-2010, 12:57 PM
  3. Data Display Help
    By FadingAPE in forum Access
    Replies: 4
    Last Post: 09-29-2010, 04:51 AM
  4. Form won't display all data
    By cbwestrunner in forum Access
    Replies: 3
    Last Post: 06-09-2010, 03:10 PM
  5. Display Non Matching Data
    By k1fox in forum Access
    Replies: 1
    Last Post: 04-03-2009, 07:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums