Search results

  1. B

    Syntax error? I beg to differ

    Seriously, what in the hell is wrong with the syntax of this statement? UPDATE 573_sae_data_new_aerpt INNER JOIN 573_sae_data_new ON 573_sae_data_new_aerpt.CSPCCID = 573_sae_data_new.CSPCCID SET 573_sae_data_new_aerpt.AERPT = 573_sae_data_new.AERPT Access gives the lovely error: Syntax...
  2. B

    Formatting numbers to have a leading zero

    I have an INSERT query like so: INSERT INTO table1 (column1, column2, column3, column4, column5) SELECT (field1, field2, field3, field4, field1 & "" && field2) FROM mastertable According to the format desired by a client, column5 from table1 needs to have field1 and field2 concatenated...
  3. B

    parametrized Queries

    I am looking for a good tutorial on parametrized queries in VBA. I am creating a query based on results of another query... but one of the strings contains a single quote and destroys my second query and it cannot execute properly. My code: Private Sub getUserLeaderInfo(ByVal record As Long...
  4. B

    What VBA's equivalent to this VB.NET code??

    Here is my VB.NET code: Dim listOfRecs As List(Of Integer) = New List(Of Integer) Dim queryStr As String = "SELECT DISTINCT recnum FROM t_User_Ldr" con.Open() cmd = New OleDbCommand(queryStr, con) Using reader As OleDbDataReader = cmd.ExecuteReader()...
  5. B

    Special characters in Default Value and Query

    First of all, this is not my database design choice, it's just what I have to deal with.... The DB guy designed a table which has a field with a default value of 'No' (single quotes include). It's a textfield. I am creating a form to input data into that table. I want the textbox that is...
  6. B

    My query code doesn't work

    I have no idea why this is not working. This is ALL the code I have for the Form I've created. I didn't provide any field names in the query because I know they are all in order correctly. This code worked at some point. I added a new subroutine and everything stopped working. So I deleted...
  7. B

    Technical Wording help (not code)

    I need help putting this into technical terminology: Our database "admin team" designed database to house survey questions. The problem is they gave every single question its own column and every single answer its own column. Essential an entire survey for one person is stored in a single...
  8. B

    Queries filling out textbox w/ combobox

    I know how to do this in VB.NET but VBA is killing me!!! I have a form with a combo box. I would like to create an "on change" event where it updates the text boxes on that same form depending on what's been selected in the combo box. I don't know how to change the combo box's selected index...
  9. B

    Querying a passworded DB

    I set up my MS Access 2007 database with a password. I've written a program in VB.NET to communicate with the database. However, now that it's been passworded, obviously the queries don't work. What do I have to add in my program to access the database? Would I have to put it somewhere in the...
  10. B

    Can't get any of my code to execute!

    I'm simply trying to make a message box display when a user clicks on a button. I go to the "On Click" section in the properties sheet. I select Code Builder I simply put msgbox("This is a test") I save it I open the form, I click the botton and NOTHING happens What am I missing here...
  11. B

    Query criteria retrieved from a Form's listbox

    Right now on my form I have a comobox options within. The query takes the selection from the form combobox like so: [forms]![formname]![comboboxname] It successfuly retrieves what the user selects, but how can I do the same thing but with a listbox that has a multiselect?? Would I have to...
  12. B

    Query criteria retrieved from a Form combobox?

    Right now on my form I have a comobox with 3 options. The third option is an "all of the above" case. The query takes the selection from the form combobox like so: [forms]![formname]![comboboxname] The problem is: I can't figure out how to tell it to take both option1 and option2 as the...
  13. B

    Having a hard time programmatically making reports

    I can barely find answers in google or MSDN. I'm trying to find a tutorial, or at least some sample code on how to programmatically create a report. What I have now is a Form that opens up with the Access database with drop down menus that allows people to use my own interface to customize a...
Top Bottom