Results 1 to 12 of 12
  1. #1
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Unanswered: Message Pops up Column Data Unavailable

    Hello I got work around for Micrsoft Hotkey CTRL Apostrophe which Insert the data from the same field in the previous record CTRL+' . I put this code in the AfterUpdate of the text boxes and combo boxes of a subform.

    for String

    Private Sub Event_Name_AfterUpdate()
    If Not IsNull(Me.Event_Name.Value) Then
    Event_Name.DefaultValue = """" & Me.Event_Name.Value & """"
    End If
    End Sub


    for datetime


    Private Sub YourDateControlName_AfterUpdate()
    If Not IsNull(Me.YourDateControlName.Value) Then
    YourDateControlName.DefaultValue ="#" & Me.YourDateControlName & "#"
    End If
    End Sub


    I put this on the second subform but when add a record, I get a message sayig colum data unavailabe and I'm not sure why. can anyone help pls

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Mnnnn interesting. I can't say I can remember ever seeing that error.

    Might have something to do with data formatting.... I'd try this:

    YourDateControlName.DefaultValue ="#" & Format(Me.YourDateControlName,"d mmm yyyy") & "#"

    To force Access to understand the date.

    I should ask... which line of code does it stop on and is "Column Data Unavailable" the ENTIRE error you are receiving?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    The only thing that comes to mind is that you're trying this on a field, possibly the date field, that is not being populated by the user actually typing in the data. If the data is entered thru code, such as thru the use of a DatePicker/Calender or some other code event, the field's AFterUpdate event would not be fired and hence there would be no DefaultValue available.

    But I have to say that like Trekker, I've never seen the "Column Data Unavailable" error before.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    Can anyone tell me why I'm getting an error message with my code I have two control names one is To the other From
    Datatype NVarchar(50)


    Private Sub To_AfterUpdate()
    If Not IsNull(Me.To.Value) Then
    To.DefaultValue = """" & Me.To.Value & """"
    End If
    End Sub

  5. #5
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    Quote Originally Posted by StarTrekker
    Mnnnn interesting. I can't say I can remember ever seeing that error.

    Might have something to do with data formatting.... I'd try this:

    YourDateControlName.DefaultValue ="#" & Format(Me.YourDateControlName,"d mmm yyyy") & "#"

    To force Access to understand the date.

    I should ask... which line of code does it stop on and is "Column Data Unavailable" the ENTIRE error you are receiving?
    thank you startrekker its actually a time field
    this is the format its in
    99:00\ >LL;0;_

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Well I have more questions now, but since you ignored my last two questions.......
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  7. #7
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    A number of things of things.

    First off,

    Event_Name.DefaultValue = """" & Me.Event_Name.Value & """"

    will actually work for Text, Number and Date/Time DataTypes.

    Next, there is no such thing in Access as a "time" field, as you've stated. There is a Date/Time DataType for fields which can contain only time, if need be. Also note that setting the Format or Input Mask to

    99:00\ >LL;0;_

    does not make this a Date/Time field either, this simply tells Access how to display it or how to allow the user to input it. The Datatype has to be defined in the Table.

    Third, and more confusing, you originally state that the field is

    DataType NVarchar(50)

    which is not even an Access Datatype! I seem to recall this being a valid Datatype in SQL Server, but can't swear to that. What kind of tables are you working with here?

    And lastly, From is a Reserved Word in Access and shouldn't be used as it will surely cause problems, sooner or later.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  8. #8
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    Quote Originally Posted by StarTrekker
    Well I have more questions now, but since you ignored my last two questions.......

    I'm sorry StarTrekker I found out that I was using a reserved word so that was a problem

    Answers here

    List of reserved words in Access 2002 and in later versions of Access


    so I changed it to Beginnig Time and Ending Time

  9. #9
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    this is the error message I'm getting

    This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired.


    I get this messae when I starting the data entry

  10. #10
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    I'm sorry, but how did

    Quote Originally Posted by desireemm
    Message Pops up Column Data Unavailable
    become this:

    Quote Originally Posted by desireemm
    This is the error message I'm getting

    This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired.
    Has the error changed since you changed the control names to non-reserved words?

    And once again, what kind of tables are we talking about here, since

    DataType NVarchar(50)

    is not a valid Accesss Datatype?

    I really think we're going to have to actually see the file in order to help you. Can you attach it to a post?
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  11. #11
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    thank you Missingling its all solved now, figured it out thank you

  12. #12
    Join Date
    Oct 2010
    Posts
    1

    Red face column data unavailable for combo box

    I am also having this problem - what was the solution

    We began receiving this error after converting our Access 2003 project using a SQL Server backend, to Access 2007. The message "Column data unavailable" comes up on GotFocus of combo boxes where we normally assign the rowsource based on other entered data. This never happened in Access 2003 but is happening quite often in Access 2007. The first time it happened the rowsource was actually based on values from a query from a linked server so I changed it to create a temporary table instead. Now the message is coming up for a combo box that is queried straight from the SQL Server data.

    Please, any help on this would be appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •