Search results

  1. P

    month string to numerical month

    Hi I have a field that is text which holds the month in form "oct" etc. I need to pass the numerical value of that month to a function so how do I create an expression that will change it (in this instance) to 09. kind regards in advance. peter
  2. P

    if...is null problem

    THANK YOU so much it worked a treat.
  3. P

    if...is null problem

    Hi I have to evaluate an is null. i have: ArrDate = Me.Arrival_Date.Value TodayDate = Now If (ArrDate Is Null) Then 'date field is empty do nothing else 'do something end if it halts by saying object not found so how do i correctly evaluate the if? regards Peter
  4. P

    filter insists on parameter

    hypen problem I tried that Larry and it failed its almost as if the name of the field with the hypen is causing the problem ie group-dsn. any ideas how to get around that? regards
  5. P

    filter insists on parameter

    I have a main form whose recordsource is a table that holds transaction data. the pk to filter is taken from another open form and i want to filter on the group that was selected with the group number being a fk in the ftran table as a number. the open event has the following code: Dim GroupID...
  6. P

    trouble updating recordsource

    I have a form that takes a pk from another open form, what i would like is to show the transactional records for the pk. i have: Dim GroupID As String 'get groupid from open group deal form GroupID = Forms![group main screen form]!GroupID 'create sqlstring sql = "SELECT FTRAN.FtranID...
  7. P

    update rowsource in subform in vba

    I am getting confused excuse my stupidity i have: stringsql = "SELECT FTRAN.FtranID, FTRAN.[AGENT-DSN], FTRAN.[GROUP-DSN], FTRAN.Date, FTRAN.Amount, FTRAN.[F Type], FTRAN.Cat From FTRAN WHERE (((FTRAN.[GROUP-DSN])=" & Me.CbGrpGroup.Value & "));" Forms![frmgroupftraninput]![ftran query...
  8. P

    update rowsource in subform in vba

    I have two combos the first is for the user to select the agent and then the second populates with group ids from that agent. The subform shows transactional records against the selected group, so i need to create a rowsouce (query string) that will amend the subform records dependent on the...
  9. P

    update rowsource in subform in vba

    I have some code on the after update event of a combo, the combo gets a pk value of a group. Code: Forms![ftran query subform].RowSource = "SELECT FTRAN.FtranID, FTRAN.[AGENT-DSN], FTRAN.[GROUP-DSN], FTRAN.Date, FTRAN.Amount, FTRAN.[F Type], FTRAN.Cat From FTRAN WHERE (((FTRAN.[GROUP-DSN])=" &...
  10. P

    select case

    I want to use a select case statement but not sure how to evaluate part of the case: Select case Me.CBIndProduct.Column(2) Case ... Here the word commission is to be identified which is left 10 of Me.CBIndProduct.Column(2) case else end select the string for commission is longer than 10...
  11. P

    Update textfield dynamically

    It worked a treat many thanks
  12. P

    Update textfield dynamically

    I have a database that has a field [country] that stores the numerical id of the country from a table of countries. The student table also has a field called [mother tongue] and it seems to me that this is duplication. I created a simple query based on a link table that tells me the country and...
  13. P

    how to test if row from one recordset field value appears in another recordset

    Thank you I will go with your suggestion, thank you for your advice it is much appreciated. kind regards Peter
  14. P

    how to test if row from one recordset field value appears in another recordset

    no the id of the student is grabbed from a form in vba and then vba will create a rowsource string dependent on the result. The database is awash with queries from an earlier developer and i wanted to try and keep them down. but as you say i might be going about this the wrong way.
  15. P

    how to test if row from one recordset field value appears in another recordset

    I have used the suggested method and produced the folloowing: SELECT QryBookedCourses.StudentID, QryBookedCourses.[COURSE-DSName], QryNewProducts.[Product Code] FROM QryBookedCourses LEFT JOIN QryNewProducts ON QryBookedCourses.[COURSE-DSName] = QryNewProducts.[Product Code] WHERE...
  16. P

    how to test if row from one recordset field value appears in another recordset

    I will try that Keithg thank you i had not thought of that regards
  17. P

    how to test if row from one recordset field value appears in another recordset

    Hi I have two recordsets one based on a query: 'query to get recordset of booked products per student StrSelect = "SELECT STUDENT.StudentID, COURSEBK.[COURSE-DSName]" StrFrom = "FROM STUDENT INNER JOIN COURSEBK ON STUDENT.StudentID = COURSEBK.[STUDENT-DSN]" StrWhere = "WHERE...
  18. P

    how to check if docmd successful

    DBengine error count Your suggestions work great. I have a last piece of code that only needs to run if no error occurred: If DBEngine.Errors.Count = 0 Then MsgBox (Rcount & " " & Strmessage & " added to datastore") ' now save spreadsheet as processed Dim Today Today = Now ' Assign current...
  19. P

    how to check if docmd successful

    I have the following that appends data from one table to another: (I didnt print the sql string as you know what it does) If Not RstAppend.BOF And Not RstAppend.EOF Then 'if data in recordset do something DoCmd.SetWarnings False DoCmd.RunSQL StrQry The sql string appends from one table to...
  20. P

    dropdown class greyed out

    I would like to create a dropdown list in each cell that is only visible on double click. if i look in the object browser for dropdown class it is greyed out how do i get it to use. regards peter
Back
Top Bottom