Search results

  1. Calvin

    RecSet.RecordCount = -1. Why?

    Sorry, it was pseudo code, rst.RecordCount would be correct. Is there any reason why you have to use a forward only connection?
  2. Calvin

    RecSet.RecordCount = -1. Why?

    Long standing issue with recordsets has been the issue of them not having a more intuitive RecCount. The solution is before you perform the RecSet.Recount, insert a RecSet.MoveLast method to allow for a more accurate RecCount value. Example: Dim lngTotal As Long Dim rst As New adodb.Recordset...
  3. Calvin

    Funny Listbox side effect when updating Form.RecordSource

    I've written a work around for solving this, where I just put a loop near the end of the subroutine that re-selects the values in the list. pseudo code: Sub lstStatus_Click {loop through listbox items and read selected items, remember it's multi-select, and return strWhere} strSQL =...
  4. Calvin

    Funny Listbox side effect when updating Form.RecordSource

    Ok, I've got a new one, but first some background: I have an ADP project in Access 2003, our business is upgrading to Office 2007, and the solution/problem I'm about to explain works fine in 2003 adp, as it always has since it was in 97 mdb, then 2000 mdb then 2000 adp, then 2003 adp. Now with...
  5. Calvin

    Complex Problem

    Due to the complexity of your criteria you cannot use a DLookup method which usually solves most peoples need. Therefore I would have to recommend a custom function. Start with something like this, it may not compile but should get you started, it's late and my eyes are giving out... this...
  6. Calvin

    Example of getting effective dated rows and doing math on some fields??

    you don't need a temp table. just use DLookup Method to retrieve your values from the two tables and perform your math on the fly through an action event like OnLoad or OnCurrent. If its simple enough it's possible to put it in the property sheet of the control and there is no need for any...
  7. Calvin

    Export multiple excel file base on fosUsername()

    1. create a table with two fields (UserName and FileNames) 2. store the UserName in the table with the corresponding FileNames all concatinated in one field 3. have your function use a Dlookup method to retrieve the FileNames from the table for the corresponding UserName 4. use a parse or Split...
  8. Calvin

    Criteria in DCount

    Try: 'This assumes your variable CurrentFEVersion is a String strFEMaster = DLookup("OptionValueTxt", "tblOptions", "[OptionType] ='" & CurrentFEVersion &"'") 'This assumes your variable is numeric of some kind (integer or long) strFEMaster = DLookup("OptionValueTxt", "tblOptions"...
  9. Calvin

    Shell Function

    your not concatenating your MyValue string correctly. Try: MyValue = ("M:\QOLData\Sent" & Format(Date, "ddmmyyyy")) 'this is ok RetValue = Shell("C:\program files\Winzip\winzip32.exe -min -a " & MyValue & "\Test.zip M:\QOLData\QOLTb1.txt") 'this line needed fixed -cheerz yourself
  10. Calvin

    Dlookup a GUID field...

    belated 2-cents worth I was searching for an example of StringFromGUID to better explain to a co-worker/programmer and was surprised to only find this one thread with no resolution. So here's my 2-cents worth, belated as it is over 2 years later, but thought an answer would be good for the...
  11. Calvin

    Removing the Filter in a Search Form

    Work SQL into your process instead of using filters. It's faster and more flexible than filters. MyForm.RecordSource = "SELECT * FROM MyTable WHERE MyField1 = 'xyz' AND MyField2 = 'abc' ORDER BY MyField3, MyDateField" If you don't know what SQL is or understand it's syntax, search this...
  12. Calvin

    Help writing an expression for a form

    In your Parent form use the forms OnCurrent event as your trigger and within it use a DLookup to get what you need, pass it to a variable and then do what ever math you want to it. Example: Private Sub Form_Current() 'get the hours worked for the current program number Dim...
  13. Calvin

    Showing query in a form and using filter

    Use a subform to display your query by binding the form to your query, and set the forms Default View property to DataSheet. You will also need a trigger of somekind to update your query, maybe an OnClick event or an AfterUpdate event. You may find working with your query easier by using SQL...
  14. Calvin

    Filtering within search results

    Change each button to open the form and then set the recordsource of the form using sql, example: DoCmd.OpenForm "AdminSearchResults" Form_AdminSearchResults.RecordSource = "SELECT * FROM yourtable WHERE VendName ='" & VendName & "'" Repeat this for each button and tailer the SQL to the...
  15. Calvin

    Front End / Back End split - where do you keep your tables?

    Keith, I think you've a fair understanding of how to divide the tables up. Mostly it will depend on the specific needs of your project. You don't have to load everything in the backend, but sometimes in the begining of a project, by having all your tables in the backend, it may be...
  16. Calvin

    Call AfterUpdate of a Control

    Try This... Dim strSubName as String For Each ctl In frm.Controls If ctl.ControlType = acCheckBox Then ctl.Value = False strSubName = str(frm.Controls(ctl.Name)) & "_AfterUpdate" Application.Run strSubName End If Next ctl
  17. Calvin

    2003 problem with Read-Only file attribute.

    Problem solved... FYI, this was resolved with Office 2003 Service Pack 2
  18. Calvin

    2003 problem with Read-Only file attribute.

    Problem solved... FYI, this was resolved with Office 2003 Service Pack 2
  19. Calvin

    2003 problem with Read-Only file attribute.

    I have a Front-End Access Data Project file (ADE compiled format for distribution) that I purposely have the Read-Only file attribute set to True. I've been using it this way for about 7 years starting with Access 97 and the current version is 2000. I am upgrading the app to 2003 now and...
  20. Calvin

    2003 problem with Read-Only file attribute.

    I have a Front-End Access Data Project file (ADE compiled format for distribution) that I purposely have the Read-Only file attribute set to True. I've been using it this way for about 7 years starting with Access 97 and the current version is 2000. I am upgrading the app to 2003 now and...
Back
Top Bottom