Search results

  1. C

    search for a string within a string

    Thanks ended up doing the following to get it to work for me UPDATE workstations SET CPU_S = Replace([CPU_S],"PII","") WHERE InStr(1,[CPU_S],"PII")>0;
  2. C

    search for a string within a string

    Ok I used UPDATE workstations SET CPU_N = "P3" WHERE InStr(1, [CPU_S], "P111") > 0; on that note say I wanted to delete just that portion of the string from the column but leave everything else. How would I do that??
  3. C

    search for a string within a string

    I have a column called CPU_S within a table called workstation that contains sample text like P111 933 I want to use the update command to search the CPU_S column for entries that contain this in there string then add P3 to a column called CPU_N So far I have the code below but I don't know...
  4. C

    "Compile error: Variable not defined"

    I changed up the code to Public CompleteTime As Date Public Function GetTime(txtbox As Control) As Date DoCmd.OpenForm "frmGetTime", , , , , acDialog txtbox = CompleteTime End Function Private Sub cmdOK_Click() CompleteTime = Forms!frmGetTime!cboHour & ":" &...
  5. C

    "Compile error: Variable not defined"

    I figured OpenForm was looking for a string value: But know I get the following error "Run-time error '91': Object variable or With block variable not set" When I hit the debug it goes to this line txtBox.Value = CompleteTime
  6. C

    "Compile error: Variable not defined"

    I have a standard Module called DisplayTime that contains Option Compare Database Option Explicit Public txtBox As TextBox Public Function GetTime(txtBox As TextBox) DoCmd.OpenForm frmGetTime End Function Basically this function opens a form frmGetTime within the frmGetTime Option...
  7. C

    On Got Focus and On Click

    I am trying to perform a Function when ever someone clicks_on or tabs to a text box So I set the following on the event Tab On Got Focus = Calendarfor([txtDOB]) on Click = Calendarfor([txtDOB]) The tab part works great but if the user click on the text box first then it calls the function...
  8. C

    Hide the Detail section

    I am working with a form and subform but I will try your approach
  9. C

    Hide the Detail section

    I tried Me.Detail.Visible = False But no luck. I am looking to collapse that section
  10. C

    Hide the Detail section

    I currently use Me!frmPatientLookupResults.Form.Visible = False to hide a subform on my form that is in the detail section of my form. Is there a way to collapse or Hide the Detail section of the main Form?? I notice that their is a property under the Detail section called Visible with...
  11. C

    LIKE Operator used with WHERE

    Not sure where to place LIKE operator in the statement below SELECT tblPatientDemo.LastName, tblPatientDemo.FirstName, tblPatientDemo.DOB, tblPatientDemo.Gender FROM tblPatientDemo ( where (tblPatientDemo.LastName= forms!frmPatientLookup!txtLastName or forms!frmPatientLookup!txtLastName is...
  12. C

    subform update based on query in main form

    I based a subform called frmPatientLookupResults on a Query and placed it in a main Form called frmPatientLookup a command button on the Main form called cmdFind with the following code Private Sub cmdFind_Click() DoCmd.OpenForm "frmPatientLookupResults"...
  13. C

    query table present result in a form

    SELECT tblPatientDemo.LastName, tblPatientDemo.FirstName, tblPatientDemo.DOB, tblPatientDemo.Gender FROM tblPatientDemo where ( tblPatientDemo.LastName= forms!frmPatientLookup!txtLastName or forms!frmPatientLookup!txtLastName is Null) AND (tblPatientDemo.FirstName=...
  14. C

    query table present result in a form

    I created the unbound form but it's the query that I am lost on how to start
  15. C

    query table present result in a form

    I have a form that contains 3 text boxes, 1 Combo Box and a Command Button txtLastName txtFirstName txtDOB cboGender cmdFind I want the user to be able to enter at least one of these criteria and for a form to pop up with a list of individuals that match the criteria example user enters...
  16. C

    SQL statement VBA

    the SQL statement to Dim strSQL As String strSQL = "INSERT INTO tblBloodworkResults (PatientID,HepBAntibodySur,HepBAntigenSur,HepBCoreAntibody,HepCAntibody," _ & "TSH,HemaWithDiff,HIVAntibody,RPRSyphSero,HemoElectro,VaricAntibodyTit,MMRTiter)" _ & " VALUES (" _ &...
  17. C

    .source = multipe tables with innner join How

    I have a form called "frmImmunizations" that has four subforms frmHepB_Immunization, frmMMR_Immunization, frmTd_Immunization and frmVaricella_Immunization they each populate an individual table frmHepB_Immunization --> tblHepB_Immunization frmMMR_Immunization --> tblMMR_Immunization...
  18. C

    if statement to check for duplicate entries with list box

    I have a problem where in a table called tblPatientLanguage that contains three fields PatientLanguageID PatientID LanguageID a patient who is identified by PatientID can speak several languages identified by the LanguageID. The problem is with my current form and code For Each...
  19. C

    list box not populating table when set to simple

    rs("LanguageID") = Me!lstLanguage.ItemData(varSelected) I was refering to the wrong column name. I guess a night sleep helps a lot :)
  20. C

    list box not populating table when set to simple

    Man is this thing driving me batty I figured that the path to the file was the issue but still I can into another road block. I am know getting the following error "run-time error '3265': item cannot be found in the collection to the requested name or ordinal" debug brings me to Code: For...
Back
Top Bottom