Search results

  1. P

    Passing a Combo variable to a Command Button

    Thanks for that and so quickly :)
  2. P

    Passing a Combo variable to a Command Button

    Hi Thansk to everybodies help over the last few days I have learnt a great deal. After a rethionk I now have reduced a 3 step process to 2. The insertion of a record and the update of that record Dim dbsCollege As DAO.Database Dim rstStudentAnnualcourses As DAO.Recordset Dim intStuID...
  3. P

    Update syntax error

    Hi Tried both the solutions and stillcome up with syntax error in DoCmd.RunSQL strSQL?
  4. P

    Update syntax error

    Tried both and still have syntax error in DoCmd.RunSQL strSQL line?
  5. P

    Update syntax error

    HI I pasted your response in and removed the ' because both are integer. It still rports an error and your first line appears in red as soon as I pasted it. I had noticed a spelling mistake which I have corrected but still no luck. :mad:
  6. P

    Update syntax error

    Hi I am now trying to find the last record in a table and update a field in that table. The code I have is Dim dbsCollege As DAO.Database Dim rstStudentAnnualcourses As DAO.Recordset Dim strSQL As String Dim intLastRecord As Integer Set dbsCollege = CurrentDb Set...
  7. P

    Adding Data to a table using data on a form

    Thanks Paul. Saved my life again
  8. P

    Adding Data to a table using data on a form

    I am trying to add data in a related table using the PK in the data in a form. The form is based on a query selecting all Student records. Query not table because I wanted to show descriptions not numbers so have to have linked tables. The code I have so far is: Private Sub...
  9. P

    ComboBox Requery

    Thanks RuralGuy. Saved my life again.
  10. P

    ComboBox Requery

    Hi Everyone Here I am tearing my hair out again. I have a simple form for data entry with the owner of the document selected from a combo box based on the table Owners. Selecting an owner puts theOwnerID into the underlying PatientInformation table. I have code that allows the NotInList to...
  11. P

    Filtering by Option Group

    Hi Everyone PBaldy offered me this code to use an Option Group to filter a form Private Sub Frame45_AfterUpdate() With Forms!PIInput Select Case Me.Frame45 Case 1 .RecordSource = "SELECT * FROM PatientInformation WHERE Directorate Like 'Ambulatory Care'" Case 2...
  12. P

    Data Type Mismatch?

    Thanks. Added back an if isnull statemetn and it works fine. You are brilliant. Paul
  13. P

    Data Type Mismatch?

    There are two coumns ID and Directorate. ID is an integer and Directorate is Text. Hence the Syntax error of =8. Now with your alteration to the code the syntax error is "Community" i.e the first try was reading the ID column and now reads the Directorate column. But still an error? Paul
  14. P

    Data Type Mismatch?

    Thanks PBaldy for getting back so quickly. Unfortunately doing what you suggested bring up the error Syntax error in string in query expression '(Directorate=8')' which led me to believe I was working with the wrong boound column in the underlying query SELECT Directorates.ID...
  15. P

    Data Type Mismatch?

    Hi Everyone I have a Command Button to Preview a report, filtered on the options selected by a combo box. If no selection is made the preview works fine but is a selection is made I get a Data Mismatch error. The code is DoCmd.OpenReport stDocName, acViewPreview, , "Directorate=" &...
  16. P

    Title Caps with tweak

    Hi Everyone My coding skills are not great and I have seen many posts on creating Title Capitals. I would like to code for title caps except for words of 3 characters or less except if that word is the first word in the field. Another problem I have is Capital initial letters for Names. This...
  17. P

    Northwind PrintSalesReports

    Query Patient Information Screen Hi Everyone (Bob) The code posted previously is basically the code behind "Query Patient Information" Bob has got it working but after making a selection the Preview prints and does not preview? The select by date is not functioning yet, haven't written the...
  18. P

    Northwind PrintSalesReports

    Northwind PrintSales Reports Thanks Bob So quick to reply. That certainly did something. Selecting the first cases 1 and 2 after removing the full stops and printmode now, after selecting those options cause the report to print. BUT The Sub PrintReports in Northwind allowed selection of...
  19. P

    Northwind PrintSalesReports

    HI Everyone I am trying to copy the above dialog form to make selections for reports. Unfortunately Access 2003 seems to have diffferent soded and will not allow the If Is Null lines with a compile "expected end of statement" error. I have tried different methods of specifiying the condition...
  20. P

    Select Query to find empty Date fields

    Thanks Why didn't I think of that!
Back
Top Bottom