How to get a Table Field onto a form textbox..gotta be easy?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ZaphodBBB
    New Member
    • Nov 2006
    • 54

    How to get a Table Field onto a form textbox..gotta be easy?

    Hi

    It's about 2 years since I last had to write a database and I'm having difficulty with something I feel should be very simple..

    I have a table called tblNew_Equipmen t
    with an AutoNumber field called Equipment_Numbe r

    There is a form called frmAdd_Equipmen t
    When the Form is opened I want the next number from the table to be displayed in a TextBox on the form.

    The form is unbound as there are other things I want there that have nothing to do with the equipment table.

    I have tried using the Expression builder to put the table field into the TextBox when the Form is Open or Loaded with no joy. Have tried even opening a Recordset and loading the TextBox with a recordset and that will not seem to work either.

    I need the next equipment number to load onto the form ,as the person entering the data needs to produce a sticker that will be attached to the new equipment item for future reference..Cant use serial numbers as there is the possibility of them not being unique.

    Many thanks for any assistance.
    Last edited by ZaphodBBB; Nov 14 '08, 12:57 AM. Reason: needed aquestion added
  • mandanarchi
    New Member
    • Sep 2008
    • 90

    #2
    The form is unbound as there are other things I want there that have nothing to do with the equipment table.
    Try making a query, joining the fields you need to show on the form, and base the form on the query.

    Comment

    • ZaphodBBB
      New Member
      • Nov 2006
      • 54

      #3
      Thanks mandanarchi

      I ended up using a querydef that retrieves the value of the previous record (Equipment_Numb er) and then adding 1000 to it before displaying it in the TextBox field on the form and it seems to work O.K. so far.

      (I needed to add the 1000 to it as the equipment numbering labels began at 1000).

      Thanks again for having a look at it for me. Appreciated.

      Comment

      Working...