Search results

  1. B

    update query to conditionally strip leading 7 characters

    Is there a way to write an update query that strips the phrase "Email: " from a field whose value actually begins with "Email: " and leave alone those that are normal like "angusreide@hotmail.com"?
  2. B

    Count by State

    I need to modify the following query to count the number of people in each State in the US, any clues?: SELECT dbo_certs.peopleId, dbo_People.FirstName AS [First], dbo_People.LastName AS [Last], dbo_Status.StatusName AS Status, dbo_PeopleContactInfo.stateAbbrev AS State FROM...
  3. B

    Problem with Count query

    Thanks in advance for any clues on making this query work. I am trying to count the number of applicants in each of 3 categories for a date range so that my datasheet view looks something like this: Applications Education _________ _______ 27 Phd 134 Masters...
  4. B

    new PC and ODBC issues

    I just got a new PC at the office and my old ODBC connections to SQL Server are failing. I tried loading the registry files but no luck... any ideas?
  5. B

    Problem with Count query with Group by

    I am trying to count the number of people with a particular credential (qualifying credential, (numerical)) within a date range: SELECT DISTINCTROW Count(*) AS [Count Of dbo_People] FROM dbo_People INNER JOIN dbo_certs ON dbo_People.peopleId = dbo_certs.peopleId WHERE...
  6. B

    Updating a record through adodb (without ODBC) -getting error

    I'm getting what may be a datatype error with the following VBA on a form with 3 textboxes and a button for updating a record. In one textbox i type the ID# and in the other two corrections to a person's name: Private Sub UpdatePeople_Click() Dim strCUser As String strCUser = CurrentUserName...
  7. B

    DoCmd.GoToRecord then select based on a query

    I have a subform that displays one at a time the customer's address based upon the Customer in the parent form. Each customer may have several addresses with only one marked preferred. The addresses are in a separate table from the customer lis. Is there a way to have the customer's preferred...
  8. B

    Prob w/ RANDOM in a query

    I am using the SQL below to successfully return a set of 10% of my total eligible, however I need to change this to 2% but it returns NO records... puzzled: INSERT INTO Random_Temp ( indx, peopleId, audited ) SELECT TOP 10 PERCENT b.indx, b.peopleId, -1 AS audited FROM dbo_Billing AS b ORDER BY...
  9. B

    Using Connection String instead of ODBC for form

    I have a database that uses ODBC for most of its connection to SQL Server. I want to get away form this model. I have the basic code for the connection stored in a module: And the basics for referencing and querying the database's tables, but I'm not sure how to set the datasource for the form...
  10. B

    Popup Form in larger font

    I need to have the ability to have the user click on a notes field/textbox and have that launch another form that has the information in a quite larger font and it be sync'd to the Notes Textbox I have so they can see it better and have their edits immediately seen on the main screen... is this...
  11. B

    SQL Server stored procedure I'm calling from VBA

    I have a SQL Server stored procedure I'm calling from VBA and need to know how to make sure it is working by returning a simple record count. Any ideas? If I run the query from SQL Server it returns a record count: Private Sub Form_Load() Dim cmd As ADODB.Command Set cmd = New ADODB.Command...
  12. B

    Refreshing form problem

    I have a form that displays a complex set of alert buttons based upon a criteria. The code is much abbreviated but the problem is when a set of events is launched from the case statement it "sticks" that is if the case is 'nothing' (Active case) it should show no buttons but it does. Is there a...
  13. B

    Some checkboxes are 'blue'

    I'm using Office 365 and some of my checkboxes that are not checked are empty and some are empty but 'blued'... how can I fix this?
  14. B

    How to rotate an existing graph 90 degrees

    How can I rotate an existing graph 90 degrees so my years are on the x axis instead of the y axis?
  15. B

    MS Access - #Name? Error

    I have an Access frontend / SQL Server backend. Everything is working except one new field/textbox that is giving the #Name? Error. I created the new field in SQL Server (DateTime, Null), refreshed my ODBC linked table, checked to see that the field was visible from Access, then changed the...
  16. B

    query that will sum all payments

    i am trying to write a query that will sum all payments for a variable time frame, I'm kinda lost here.... thanks!! SELECT DISTINCTROW Sum([dbo_Payments].[amount]) AS [Sum Of amount], Count(*) AS [Count Of dbo_Payments], dbo_Payments.transactionDate FROM dbo_Payments WHERE...
  17. B

    parameterized update query

    I have a parameterized update query that is supposed to write in a user provided TackingNumber as long as no Tracking number exists for some records to be updated. However no rows are updated. I have the field set as simpleDate. Ideas
  18. B

    possible to update 2 fields in VBA qry

    Is it possible to update two different fields within the below UPDATE code? With CurrentDb.CreateQueryDef("", "UPDATE Applicants set Applicants.Emailed = -1 WHERE Applicants.[GCDF No] = @1") .Parameters(0) = rs(0) .Execute End With
  19. B

    Update query "Record Deleted" error

    I have a query that has worked well for 30 or more runs and suddenly I get an error at the end of the run "Record Deleted" any ideas? INSERT INTO dbo_PeopleNotes ( applicationDate, certificationDate, recertDate, certificationExpireDate, FinalRenewalNoticeSentDate, InactiveNoticeSentDate...
  20. B

    Sum query problems

    I have a count query that is throwing the error: ODBC Call Failed. Operand datatype varchar is invalid for sum operator: SELECT dbo_MHFs.[Country], Sum(dbo_MHFs.[Country]) AS CountryCount FROM dbo_MHFs GROUP BY dbo_MHFs.[Country]
Top Bottom