Search results

  1. M

    Query over past six CALENDAR months

    Assuming your table date is date format strSql = Select * From yourtable Where yourdbdate > #' & Dateadd("m",-6,Date) & "#" If you want the first day of the month, then use strSql = Select * From yourtable Where yourdbdate > #' & DateSerial(Year(Date()), Month(Date())-6,1) & "#"
  2. M

    Bind cells in a row together

    This is what I do with a complex workbook. The master is on sheet2 and is protected (my copy) which can be unprotect using my macro hidden in row 1 to the right of the rightmost column. My macro asks me for my password to unprotect. The workbook opens with a macro button in Row1 Column A, called...
  3. M

    Renumber a List

    That is why I suggested a new form be designed. Access is a very powerful tool, but in that power comes an array of options. There are many, many ways to do the same thing in Access. So any suggestion I have, may or may not be the way you would like to do it. Myself, I am very good at using the...
  4. M

    Requery doesn't work

    The .value is used to manipulate values in the current recordset. The function at this point, depending on which event it is dispatched from, may not be able to update the current recordset with your result set. You either have to do a (form).recordset in the function to refresh the recordset or...
  5. M

    Form Textbox count where date is between 2 dates

    You still haven't given me an answer on the table definition for [Date Received]. Is it Date/Time or Text? The results from converting your dates to Double show .00 in the decimal(time) component, meaning these are not true Access dates, but dates with the time stripped, either by VB code or...
  6. M

    Renumber a List

    The DoCmd.Requery is ok, but if you launch the function with a macro, you should do the requery with the same macro. Open the macro, and on the blank line below the function call, click the selection box, and you will find Requery is a selection. This way you do not need vba code. Your next...
  7. M

    Form Textbox count where date is between 2 dates

    It looks like you have a valid date in the database, and the Dcount appears correct. I really do not understand how those entries are getting counted.
  8. M

    Renumber a List

    Earlier you said the Renumber is dispatched from a command button. Can you please describe the code behind the command button, is it: a) a macro b) expression Builder c) Visual basic code It would help if you code paste or describe the command button, or the process that launches the Function...
  9. M

    Form Textbox count where date is between 2 dates

    Hi, If you take a copy of the the table, change [Date Received] field to Number, format Double, you should see the date looks like this ... 39697.1509259259. The 39697 is the number of days since Jan 1, 1900. The 1509259259 is the time. The [Date Received] > #Date()# would translate to if...
  10. M

    Renumber a List

    Your lucky you understood the 4th rule of normalization, after that it gets very technical, and is accurate, but most table designs usually end up somewhere bewtween the 2nd and third rule, with a few elements to the 4th. In the function, My does not apply, since no recordsource(form) object is...
  11. M

    Renumber a List

    Place Me.Requery right after the successful message. See code: If UpdateSpecial = True Then MsgBox "Renumbering the Special Numbers has successfully completed." Me.Requery Else MsgBox "Updating the Special Numbers failed." End If
  12. M

    Renumber a List

    Use Me.Requery to refresh the screen after the function is completed. Then you do not have to close the form. Read up on SetFocus, DoCmd.SearchForRecord, and Bookmark (recordset clone). One of these may help you position on the record you want after the process. Smiles Bob
  13. M

    Renumber a List

    No....this is working code, you may have to change the table name and field name but the code has no errors. the code Private Sub Field1_AfterUpdate() UpdateSpecial End Sub is my trigger for the function...you can ignore that code.
  14. M

    Renumber a List

    Sorry, I am assuming you have the same code I have. The code below will make space for a new entry. It also will renumber from a deleted entry. So lets say your entries are 1 to 15. To move a record from number 3 to number 8, First you dispatch the renumber function enter 9 to the function...
  15. M

    Renumber a List

    At this point, you probably have the same code I have. To move an item to a new number, EG: from 3 to 8 assuming 8 is not the last number, use the function with first input = 9 .... then retrieve #3, and change it to 9, then delete #3, and call the function with #3...the renumber will then make...
  16. M

    Form Textbox count where date is between 2 dates

    Hi, I just tested the expression on a Date field in my database. It worked fine. Check the table definition of the date, it may be a text field like I mentioned earlier. Bob
  17. M

    Button Visible/Invisible depening unon contents of other control on Form

    Actually bed time....but if you post the issue, there are many good people on the forum who can help you,
  18. M

    Button Visible/Invisible depening unon contents of other control on Form

    Ahh....ok move from form load to form OnCurrent. This will make the button dissappear on each new record. Or The field is already populated? In that case move the code from Was_Expression_of_Interest_Submitted_AfterUpdate to Form OnCurrent And Remove the one line from the form load.
  19. M

    Form Textbox count where date is between 2 dates

    First form =DCount("[Request Type]","Sheet1","[Request Type] = 'New Business'" & " AND [Date Received] < #" & DateAdd("D",-7,date()) & "#") Second Form =DCount("[Request Type]","Sheet1","[Request Type] = 'New Business'" & " AND [Date Received] >= #" & DateAdd("D",-7,date()) & "#" & " AND...
  20. M

    Button Visible/Invisible depening unon contents of other control on Form

    Replace "[Was_Expression_of_Interest_Submitted]" with Me.Was_Expression_of_Interest_Submitted
Back
Top Bottom