Results 1 to 4 of 4
  1. #1
    jker is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Aug 2023
    Posts
    36

    ACESS 2007 forms not populating database column

    in my table i have two columns
    CUST_CONCAT_LONG text
    CUST_CONCAT_SHORT text

    I created two events as follows:
    Private Sub btnSave_Click()


    cust_concat_short = CUST_LNAME & ", " & CUST_FNAME & " " & CUST_INITIAL & ",---- " & CUST_PHONE
    MsgBox "CUSTOMER: " & cust_concat_short & " *** ADDED/UPDATED ***"


    End Sub

    Private Sub btnSave_Enter()

    CUST_CONCAT_LONG = CUST_LNAME & ", " & CUST_FNAME & " " & CUST_INITIAL & ", " & CUST_PHONE & ", " & CUST_CITY



    End Sub



    in my click event, CUST_CONCAT_SHORT gets populated because i can see the value in my MSGBOX when it pops up.
    CUST_CONCAT_LONG gets populated into my table column,



    for some reason, CUST_CONCAT_SHORT does not show up in my table column but it does show as part of my MSGBOX message.


    QUESTION: why am i not getting CUST_CONCAT_SHORT populated into my table??

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,945
    Why have you posted the code twice?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    If the forms are bound, you've put the record in edit mode and the result needs to be committed. I can't imagine the purpose of your button "enter" event so you might have to explain why you think it's necessary since it might be playing a part in the problem. You could try adding

    If Me.Dirty Then Me.Dirty = False

    What seems more of an impending future issue is to save multiple fields in one. You can't do much with it if you intend to query on the field (as an example), it's no good as an index and it constitutes a calculated field, which you should not do in most situations. This has to be one of those situations.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Acess 2007 - New Record problem
    By st21 in forum Access
    Replies: 30
    Last Post: 11-16-2021, 03:17 AM
  2. how to rank using a query in acess 2007
    By BRAYAN RYAN VAN KYAN in forum Queries
    Replies: 1
    Last Post: 08-13-2013, 02:11 AM
  3. Unable to open the database in Acess 2007
    By Bhat59 in forum Access
    Replies: 1
    Last Post: 08-09-2012, 07:38 PM
  4. inserting into a SQL2005 db from Acess 2007 DB
    By macsterling in forum Queries
    Replies: 1
    Last Post: 11-28-2010, 09:12 AM
  5. Acess 2007 & SQL question
    By willigiann in forum Forms
    Replies: 3
    Last Post: 09-15-2010, 09:54 AM

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