Search results

  1. B

    Run Time error '424' Object required.

    It's Friday and I'm not seeing straight! Can you spot the reason I'm getting this error? I get the error on bold red line in the code. Thanks. Here's my code: Public Function GetCircuitExtInspDatesFromLines() 'Dim x As Integer 'Changed Circuit External Inspection date count. Dim db As Database...
  2. B

    Renaming Duplicates

    I'm using a Access97 query to rename assets in another database based on a set or criteria. Unfortunately, this criteria creates some duplicates that will need to be corrected manually in the other database. So, I'd like to "mark" the subsequent duplicates by appending the asset name with the...
  3. B

    Invalid Procedure Call error on foreign key expression.

    Hi, I'm attempting to create a foreign key field in a sub-query by using Left() and Instr() to parse the text of my key field and return the characters prior to the second "-". Example: 002-C100-4569 ---> 002-C100 When I build a second query with a relationship between the foreign key field...
  4. B

    Pesky quotes

    I could use some help. If you could review my code below I would appreciate it. It generates the following error: Run-time Error 3075: Syntax error (missing operator) in query expression '((([tbl_UnitList].[SectionCode]) = & nbrSec & ) And (([tbl_UT].[APICode]) = "));' Notice please that the...
  5. B

    txt to # and back & keep leading zeros?

    Hi all, I have a sql statement I am using in a VBA sub that I intended to find the maximum value of the last three characters in a text field (JOB_NO) whose values are all in this format - "00L000". Example - "05J123" It works fine when the last three characters represent a 3 digit number like...
  6. B

    I feel so dirty!

    Can you please take a look at this code and tell me what I'm doing wrong? Objects on the form are not enabled on new records even if my criteria matches?? This code is on the click event of a "New Record" button that launches lauches a form, creates a new record and puts the userID into the...
  7. B

    ERROR:Unable to impersonate a DCOM client???

    Hi, I get the subject error when I run this code. :confused: Private Sub AFE_No_Change() Dim dbs As DAO.Database Dim rst As DAO.Recordset Dim sql As String sql = "SELECT Count([PC_PCR Log].AFE_No) AS CountOfAFE_No " & _ "FROM [PC_PCR Log] " & _ "HAVING (((Count([PC_PCR...
  8. B

    Trouble adding and editing with same form.

    Hi all, I have one form whose record source is a table. I am attempting to use the same form to both add new records and edit records. I also use a hidden form to store the users ID for comparison to prevent users from editing records they did not create. My problem is I can not create a new...
  9. B

    Trouble passing value across forms - syntax?

    Hi all, I have a form that I would like to use to edit existing records and create new ones. I have written code for a new record button and I am having trouble passing a value from one form to the other. I get a 2427 "...expression that has no value..." error. Can you look it over for me...
  10. B

    Trouble with SQL Update Query using AutoNumber field

    I have a table nameed Users whose Primary Key is a AutoNumber field named UserID and a boolean field named LoggedIn4 that tracks wheter the user is logged in to the application. I want to log the user off when they exit the application using the following code, but I either get a data type...
  11. B

    Suggest the last

    Hi, I have a form used to create a new record. I would like to make data supplied by the user in a previous session the default value. I am strugling. Here is what I have so far: Dim lastPercent As Variant Dim sqlPercent As String sqlPercent = "SELECT TOP 1 PE_ConstReport.Percent_Compl" & _...
  12. B

    Getting a 3464 Error

    Hi, Thanks for your help! I have a Function that is intended to toggle a boolean field in a subforms recordset. If call the function with the commented SQL with a descrete record number, it works perfectly, but does not when I use the declared variable. Is Long the wrong data type for an...
  13. B

    Stripping Double quotes from memo field

    I am using MSAccess97. I have a dB in production that is collecting status reports into a memo field from a form control. I need to export this data to a comma delimited file to import into another platform. The memo field is full of "double quotes" ;) and they are corrupting the data by...
Top Bottom