Search results

  1. I

    INSERT statement from form, resulting in Run-time error '3075' Error

    I am trying to create an INSERT statement from a form to put unbound fields in a table. The challenge that I am a getting is that I am getting a Run-time error '3075' Syntax error in date in query expression '#' What is really perplexing and perhaps something that may guide in identifying...
  2. I

    Trying to update record in table from form using VBA

    It's been quite some time since I ventured onto the Forum. I would be most appreciative if someone far wiser than me might enlighten me on the following: I'm flummoxed over how to do an UPDATE using VBA on a form to update a specific record on the table using an unbound field on the form to...
  3. I

    Looping through query to rank records

    I'm finding that I'm in over my head on this as I don't believe it's possible to do with a query what I describe below. I'm sure that someone far wiser than me out there on the forum will know of a module or some other trick that can help me with the below dilemma. I have attached a sample...
  4. I

    Help! Run-time Error '3144' Syntax error in UPDATE statement

    I'm getting a message: Run-time Error '3144' Syntax error in UPDATE statement. I'm not sure why it won't run - I'm sure the error is taking place somewhere between the keyboard and my chair. When I run this from an On Click event, I get this error and when I go to the code, the last line...
  5. I

    Fields from Query joined to Table not updating table

    I have a table with an equal join to a query. I would like to take a field from the query and update the table, but I get an error message indicating that this is not an updatable query. The field from the query is an expression based on a diffferent table. I'm not quite sure why this...
  6. I

    Text With Apostrophes Throw Error from Form

    I'm having a problem when an apostrophe shows up in an unbound field (it's for either the first or last name of the person of record) on a form that: 1. creates a single record in 1STARTRequestLogAll for the individual whose name is selected in from the combo box. 2. creates multiple records...
  7. I

    Running two Select Statements in One Event

    I’m trying to run two Select statements from one event (a button on a form without fields) where the “WHERE” criteria are different. If I was doing this from a form where I could use the value of a field to do an "ELSE…Then…End If" statement, it would be no problem, but basically I’m trying...
  8. I

    Displaying Today's Date in VBA Select statement

    I want the current date to display (see Date in Red below). I have tried the following, but can't seem to get it to work: '#Date()#' #'Date()'# '#Date#' #'Date'# sSQL = " SELECT [LastName] & ', ' & [FirstName] & ' ' & [MiddleName] AS [FullName], [1STARTRequestLog].[LastName] & ', ' &...
  9. I

    Duplicate Dimming - I know this isn't right, but...

    I’m kind of stuck on my Dim statements and was hoping you might be able to give me a little nudge. The first thing I’m trying to do is see if a record (by employee ID) already exists, if a record does exist, I want the “Save” button to Update the related record in the table with the unbound...
  10. I

    Commas in VB Editor Select Statement

    I'm trying to concatenate a name so it is Last name, First Name using the following: SELECT 1STARTRequestLog.LastName & ", " & 1STARTRequestLog.FirstName AS [LNameFName] Of course, it doesn't like the comma between the quotes: & ", " &. My question is how to get around that??? Thanks much...
  11. I

    Problem with Select statement

    I'm trying to run the following from an On Click event, but I get a "Compile error: Expected: end of statement" error that highlights the From part of the statement " FROM 1STARTRequestLog ". See code below. Any ideas what I'm missing? SQL = "SELECT [1STARTRequestLog].Name AS [START...
  12. I

    How do I disable a command button after it is clicked?

    I've got a command button that I would like to disable after it is clicked. Any ideas how I can do this and where I should put the code? I'm thinking it would go in the On Click event. Thanks much for any feedback from the forum!
  13. I

    unbound field to drive query

    I've got an unbound field, unbReq, that I would like to have another unbound field "look at" (call it unbCreateDate) so that, based on the req that is in the unbReq field, a query would pull in the date in the unbCreateDate field. I can build the query and restrict the Criteria to the...
  14. I

    Updating a record in a table

    I'm trying to update a table (named [Data File] from a form. Since the record already exists, I need to identify which record is to be updated. I am using a WHERE statement (where Me.cmbCandidate.Column(1) is the Req field in the table, Me.cmbCandidate.Column(2) is the Applicant ID in the...
  15. I

    Error on query for list box

    I've got a list box on a form that is based on a query. The query CurrentPositionValidate1 works just like it's supposed to (when the form is open and the EmployeeID field has a value). However, when I plug the query into the list box I get the following error: "Syntax error (missing...
  16. I

    Updating unbound field based on another unbound field

    Okay... So, I'm pretty comfortable with using the After Update and On Change events for a combo box to populate unbound fields on a form. The problem I'm now having is that when one of the unbound fields (unbEmployeeNo) on the form (that gets updated via the After Update or On Change...
  17. I

    Cursor to Left of Field on Click

    I have a field for recording social secrity number with an input mask. I'm finding that end users are clicking into the field (instead of tabbing from field to field) and getting confused when it comes to going to the far left of the field to enter the data. How do I create an On Click or On...
  18. I

    "INSERT INTO" AND Update to Two Different Tables

    I have unbound fields on a form that I wish to "On Click" save to two different tables (some of the unbound fields being INSERTED INTO one table "tblOSHW_EAN_NewHireInfo" and two of the fields being UPDATED to another table "tblOSHWLabRequest"). I've successfully INSERTED INTO the...
  19. I

    Delete from List Box

    I have a list box on a form that displays two columns (Path and Mapping) for Shared Folders assigned to a person. These columns come from a query based on three criteria of the form (1. Location; 2. Department; 3. Position) that are not displayed in the query (or for that matter, the list box)...
  20. I

    Compile error: Duplicate declaration in current scope"

    I'm getting a compile error: Duplicate declaration in scope. I'm pretty sure it has something to do with me having the DimstDocName As String (in red) in there twice for two different procedures (one to run a delete query and the second to open the form again after closing). There's something...
Back
Top Bottom