Search results

  1. J

    how to reference a column in a table

    Hi WayneRyan: Thanks for the tip (but I tried that just before you posted!)... Anything else missing from the SQL that you can see? (By the way, the more I think about it, the more my users are going to need this data stored in every single row of the particular column of the table... they're...
  2. J

    how to reference a column in a table

    I tried setting up the SQL code so that the "interpretation" would look like this UPDATE [Test Table] SET [Test Table].[Client Name] = 'Test Name' but that didn't help. Anything wrong with the interpretation that you can see? I'll try putting in the ; at the end.
  3. J

    how to reference a column in a table

    Interesting! Ctrl-G. OK, Here is the result of the latest attempt to run the SQL: UPDATE Test Table SET Test Table.[Client Name] = 'Test Name'
  4. J

    how to reference a column in a table

    I would, except that the code you gave me: strSQL = "UPDATE " & SaveToTable & " SET " & SaveToTable & ".[Client Name] = '" & Me.ModTxtName & "'" Debug.Print strSQL isn't doing anything new. Actually, it's not doing anything at all. What's the Debug.Print supposed to do? Open a new window? Or...
  5. J

    how to reference a column in a table

    Nevermind, the problem was that I forgot to drop the = between the strSQL = "UPDATE... Now that that's gone, it's giving me a general "syntax error in SQL statement" error. DoCmd.RunSQL "UPDATE " & SaveToTable & " SET " & SaveToTable & ".[Client Name] = '" & Me.ModTxtName & "'"
  6. J

    how to reference a column in a table

    Me.ModTxtName is the control name for the text box that contains the information that is to be stored to the table. So, to answer your question... No, Me.ModTxtName is not a text value, but the contents of it is a text value... When I compile, I get the error "Argument not optional." and it...
  7. J

    how to reference a column in a table

    It's not working, but I see the points you are making... OK, so I need to declare strSQL as a String variable? Done. Are you missing the ending &";" to the SQL? Are you sure single quotes need to go between the Me.ModTxtName?
  8. J

    how to reference a column in a table

    What I'm trying to do, SforSoftware, is take info from a text box (on my form called Switchboard) and store it into every row of a particular column in my table (the name of which varies). As I do more and more research, I've found that people generally would recommend doing this via an "update...
  9. J

    Me.TxtBox.DefaultValue

    Ah. Thanks. ...I don't suppose you know how to write an update query, do you?
  10. J

    how to reference a column in a table

    update query OK, I've been working on my update query. I have a feeling that it's close, but I have no idea (and it's not actually updating the table). Any help? (I have to grab the table name from a list box... that explains the For...Next) Dim varItem As Variant Dim SaveToTable As String For...
  11. J

    how to reference a column in a table

    SforSoftware, could you help me write the update query? The only query I've ever used is an SQL (shown below) used to fill a list box with the names of tables in my database. So, actually I don't know what you mean by using 'Change into.' Any help would be appreciated. strSQL = "SELECT Name...
  12. J

    Me.TxtBox.DefaultValue

    OK, nevermind. This was one of those occasions I couldn't see the forest through the trees. If anyone was paying attention and wants to know, don't use .DefaultValue when you want to set the entry of an unbound text box to a string variable. Just set it like this: Me.TxtBox = strVariable Instead...
  13. J

    Me.TxtBox.DefaultValue

    Yes, I realize that (for whatever reason) when you set the DefaultValue to a string you need 3 sets of quotes. But what I want to do is set the DefaultValue to a variable that contains a string. I've noted that, as per the suggestion in Help, if you try to set Me.TxtBox.DefaultValue =Now() the...
  14. J

    Me.TxtBox.DefaultValue

    I've read the Access Help on how to set the default value of a an unbound text box to a default value: Me.TxtBox.DefaultValue = """NULL""" I want to be able to set the default value of the text box to a string variable, but it seems I don't know the correct syntax. Dim TxtValue As String...
  15. J

    how to reference a column in a table

    Alright, I'll try that... I don't have much experience with queries, but what you described sounds pretty simple. On the other hand, is there a way to do this without a query? Maybe this should be a separate post, but I have a second question: How can I read the value from a specific cell of a...
  16. J

    how to reference a column in a table

    update query I want to take some string data (typed by the user in a text box) and save it to all row entries of ONE column in a specific table. Is this possible? I'm assuming a loop is necessary from 1 to COUNT of the table's rows and then I would have to designate which column of the active...
  17. J

    Export to Excel with File Browser

    Not really. And it didn't work.
  18. J

    Export to Excel with File Browser

    Alright. Can you at least tell me if and how it might be possible to combine some of the variables of the same type during the OPENFILENAME type declaration? There are a number of Long, String and Integers. Can they be declared on the same line? For example: lStructSize, hWndOwner As Long...
  19. J

    Export to Excel with File Browser

    For example, the following variables of the TYPE OPENFILENAME do not seem to be used in the GetOpenFileNameGs function... I'm assuming that they may be used under other circumstances. But for my purposes, can I safely remove these from the Type declaration? lpstrCustomFilter As String 'NOT...
  20. J

    Export to Excel with File Browser

    Well, actually, my goal is to simply cut away as much of the code I'm using for the import-browse process as possible. The problem is that I really don't know what the code is doing exactly. I've already managed to trim it down some, but my ultimate goal is to get it small enough so that it...
Back
Top Bottom