Search results

  1. P

    count populated row in spreadsheet for import to table

    Hi everyone BAT17 was kind enough to provide a function to count the number of populated rows in a column so as only to import populated rows into a table using transferspreadsheet method. I have added the function to a module and called it but it always returns 65536 despite only two rows one...
  2. P

    import from excel worksheet straight to table

    I have written some code that scans a worksheet, populates an array and then i scan the array and populate a table with the data. I s it possible to put the data straight into the table? I wasnt sure how to do that. ideas would be appreciated. regards
  3. P

    open spreadsheet via dialogue

    I have the following code that allows me to get data from an excel spreadsheet: Set objXLBook = GetObject("d:\Datastore\EIF.xls") Set objXLApp = objXLBook.Parent Set objQryStudentSheet = objXLBook.Worksheets("Student details") Set objQuerySheet = objXLBook.Worksheets("Agent details") I would...
  4. P

    How to show a default value for item on report

    I have a report that has a list price field on it populated from a query. Sometimes this has a value in it. what i want is the value to default to zero when the report runs despite the vale from the query. how can i do this?
  5. P

    copy field data from main form to a subform on add new record

    Problem cured rural as you said on before update event. thank you so much
  6. P

    copy field data from main form to a subform on add new record

    if evaluates incorrectly on add record Hi rural (or anyone else) yes, even with the simplified code if i select the row i want to delete the oncurrent event runs and the if does not evaluate true, however once i click delete the if evaluates true and the code runs, its strange. regards If...
  7. P

    combo box linked to pk

    I have a main form with a subform linked by id. In the subform I have a combo box with list of agents in it from a table. I would like to know how to get the combo to only show agents only linked to the group id on the main form. help would be much appreciated regards
  8. P

    copy field data from main form to a subform on add new record

    on current event of subform The subform now grabs the date field values from my parent form on the oncurrent event of the subform with the following: Dim StrDateFrom As String Dim StrDateTo As String If Me.NewRecord Then Forms![Group Main Screen Form]![Arrival Date].SetFocus...
  9. P

    copy field data from main form to a subform on add new record

    I have a main form that has some sub forms on it linked by master child on PK. When I select a new record on the sub forms I want to take a date value from the main form and populate the value into a field in the sub form. How do I do this as I cannot see a new record event on the sub form...
  10. P

    how to link subforms to other subforms on an unbound form

    I forum could someone tell me: I have an unbound form on that form I want to put three sub forms one on a products table the other on a course start dates table and the link table that joins the other two together. all three are related to each other with Pk/FK links. When I try to link them...
  11. P

    how to get current record id after update

    I have some code that creates a recordset from some tempory tables and then creates a new record in the live tables accordingly. The next bit i need is to grab the primary key code as it is the foreign key in the next table i want to update against that product. I dont seem to be able to grab...
  12. P

    autonumbering

    I have a table with an autonumber as pk. it has reached 67378 and now has started wanting to add records back from 1 again. The newest record want to start from 19 ( I guess as i attempted to add records from a recordset it used up numbers from 1 to 18 and ditched them). I obviously could never...
  13. P

    find a date within a recordset in vba

    conversion problem In an effort to find what is going wrong on the date search i created an expression based on the [startdate] exp:(cstr([startdate]) searchstr=me.cbstartdate.text with recordset ... and then .FindFirst "[exp]='" & searchstr & "'" based on strings it finds the date within...
  14. P

    find a date within a recordset in vba

    not sure if this is enough or will work. you can see that I must select a year first ie current or next. i choose next as data only exists for next years product so far. then the combo will fill with the course codes for the year that you choose. then choose the duration of the course and then...
  15. P

    find a date within a recordset in vba

    yes interestingly i did that. pasted code into new query and it runs and shows the dataset with the field in question. then i put data from combo in msgbox and also looked at field data. its driving me mad as the code should work. is it the 2 # around where part of findfirst?
  16. P

    find a date within a recordset in vba

    It returns 09/07/06 exactly as shown and yes the field is date time format short date. :)
  17. P

    find a date within a recordset in vba

    Dim DtStartDate As Date Me.CBStartDate.SetFocus DtStartDate = DateValue(Me.CBStartDate.Value) tried the selecting and then # but it didt seem to work so here is the bit that gets the date from the combo. regards and thanks for the advice so far.
  18. P

    find a date within a recordset in vba

    The .nomatch method does not evaluate correctly and i cannot see why as the framework of code is correct ithink. here is the code so far: Dim DtStartDate As Date Dim strSel As String Dim strFro As String Dim strwhe As String Dim strhav As String Dim...
  19. P

    find a date within a recordset in vba

    If more than one row exists and the findfirst returns false, do i have to move through the recordset further? in essence i want to see if my search value appears in any of the rows, of course i dont know which one. i am using dao. regards heres what i have now Dim RstPeakDates As...
  20. P

    find a date within a recordset in vba

    how do i evaluate if this search is true Thats great thank you would like to return a boolean value if the search is true not quite sure how would: if(rstxxx.findfirst)=true ... or differently if search item (my case date) not found regards Peter
Back
Top Bottom