Search results

  1. M

    Loop and Recordets

    I only posted the method in which I have done this in the past. I've only used this method to hold calculated data in a temporary table or do global record updates. NOT for storing calculated values permanently. I will agree that the above situation should not store calculated data. I guess my...
  2. M

    Convert Text Column to Number

    If there are spaces involved, I think I'd use something like Cint(Trim([FieldName]). Just something off the top of my head. Maybe someone used and O's instead of a zeros?
  3. M

    Loop and Recordets

    I put together a little example of what I think you are talking about doing. You'll have to add a little more to handle the first record in the set. Function CalcClosing() Dim rs As Recordset, strSQl As String Dim intClosing As Integer strSQl = "SELECT * from tblMyExample ORDER by Opening;" Set...
  4. M

    Loop and Recordets

    Are the fields you are using to do your calculation in the same table as the field you want to write the answer to? Would an update query work in place of a VBA loop? The Model.mdb posted will not open for me to view. Is it possible for you to post the table you want to perform the loop on?
  5. M

    Date in previous week

    Whoops, I guess you're looking for next week and not the previous week. Just change the - 1 to + 1 in the function. If you don't want to use the function method, just use the same code for the current week and add the +1 or -1 to get the previous or next week. What I have found out in working...
  6. M

    Date in previous week

    I hate complicated queries so sometimes I will send one of the fields to a function to process it. I made a new module and put this function in it. Function GetLastWeek(dteSalesDate As Date) GetLastWeek = DatePart("ww", dteSalesDate) - 1 End Function In your query, make a new field control...
  7. M

    Type Mismatch on db.OpenRecordset

    Yes, I've had it happen myself. Interestly enough, I've fixed this in another way also. I changed the order of the references and have sometimes had to change the order back. Yes, good catch! I do have a question about the code posted though. I've always felt "less code is better" (minus error...
  8. M

    Type Mismatch on db.OpenRecordset

    Maybe the unscores/spaces in the name are causing the issue? I agree, make sure you have the reference for DAO. Open a VBA code module, Tools, References, Microsoft DAO x.x Object Library. Dim rs as DAO.Recordset Set rs = Currentdb.OpenRecordset("T_I_Adjust_Count_Of_Renters") Is...
  9. M

    Waiting for a textbox to update

    Does the recordset in the dlookup have a lot of records in it? I would try grabbing the value on report open and not take it from the textbox.
  10. M

    Question Database DAO Bloat

    I've been using the set rs = nothing not always using rs.close Do you think it would decrease DAO bloat by a lot if I did include it?
  11. M

    DB Password

    It's been a long time since I've used it but it did work well. I had an issue with someone (unauthorized to have the data) creating a new mdb and importing the data from the linked tables into the new database. My solution was to password protect the backend, connect to the tables after the user...
  12. M

    Question Database DAO Bloat

    I've been researching into why I have so much bloat on my backend datasets. The 'non-bloated" size is 16mb while bloated is double (32mb) after a high user level day. I was wondering if anyone out there has reduced their bloat by using the Microsoft suggestion...
  13. M

    Populate four tables from one entry

    Research cascading update and delete under relationships. You'll need to assign a primary key for each of the 4 tables to accomplish it though.
  14. M

    DB Password

    In the past I've done this using a function. Mainly because I wanted to not have any links to the data active until the user passed login requirements. I made the front end an mde so the password stayed protected in code. Under the front end Project Properties (Protection), I locked the project...
  15. M

    Need a password input box

    The code you posted I made a new module for and pasted the code you have into it. To call it from a form: 'I used it for a password to open an Administrative Form so..... Dim strAdminPWord as String strAdminPWord = InputBoxDK("Password required to proceed.") If strAdminPWord = "password" Then...
  16. M

    Save Report at Attachment

    Normally, I design a custom toolbar for reports and add it as the reports toolbar. There is an option (as long as you use Outlook as an email client) in the toolbar section to attach to email. I say in Outlook because I've never gotten it to work with Groupwise email.
  17. M

    How do i use VBA to apply a value to multiple records

    It sounds like you should just use an update query using criteria to choose the records.
  18. M

    Access to Excel

    Sample DB attached Access 2003 attachment. See example in the attached db. It worked fine for me. I didn't change any of the code. As I said, I think your reference for Excel is not set.
  19. M

    Access to Excel

    It still sounds like a reference problem. Read the post I posted earlier.
  20. M

    Can you save a file with yesterday's date in the file name?

    True I think the filename should be changed as well. I normally name my files in YYMMDD format. It does make things easier to find. I only made it the same as what they already have.
Back
Top Bottom