Search results

  1. P

    date validation + 3 days

    Teiben. I just noticed that your users would be able to enter the wrong date if they first fill in the DueDate and then the DateIn. This can be prevented by placing exactly the same coding in the BeforeUpdate event of the InDate as well. The module will then look like this: Private Sub...
  2. P

    date validation + 3 days

    Try this, teiben. Notice that the underscore at the end of the Msgbox line splits that line in two, but it works like one line. You had it right, except for two mistakes. You had the date fields wrong way round, and a > instead of a < sign. Because you want DueDate to be at least 3 days BIGGER...
  3. P

    data in forms from tables with relationships?

    I think this will work if you want to go to the last record in a subform. Else use the first example above. Put this in the main form, to set the focus on the subform: Private Sub Form_Open(Cancel As Integer) Me.YourSubformName.SetFocus End Sub Put this in the subform, to go to the last...
  4. P

    data in forms from tables with relationships?

    I'm not very experienced myself, but this works if you put it in the Open event of the form. I think it takes a little more coding if you want to go to the latest record in a subform. Let me know, and I will look at it again. Private Sub Form_Open(Cancel As Integer) DoCmd.GoToRecord...
  5. P

    How to open a form in another database and filter it.

    Okay guys. I'm demonstrating my ignorance. The answer is in the Public Function called OpenADatabase. Sorry for my ignorance, Uncle Gizmo, and thanks a lot! Pierre.
  6. P

    How to open a form in another database and filter it.

    Sorry, Uncle Gizmo, It actually works somehow, still going to the right ID if the string is the same in two different records. Amazing thing, this coding! Could you tell me why it works, because it seems that the code does not refer to the ID's? Pierre.
  7. P

    How to open a form in another database and filter it.

    - because in a large database the search for the string is not going to have a specific result, if indeed that is what is happening. Maybe one could specify the ID field of both the front-end form and the back-end form in the code?
  8. P

    How to open a form in another database and filter it.

    It seems in your new code that the reference is to ExpectationDesc. Would it not be better to connect the ExpectationID's?
  9. P

    How to open a form in another database and filter it.

    Uncle Gizmo, I really appreciate your reference, but if you look at my code, that link is where I got it. The next interesting code would be how to make a specific record open. I have tried it up there but it did not work. Pierre. SORRY. IGNORE ABOVE. It is changed and seems really great...
  10. P

    How to open a form in another database and filter it.

    Access 2002 The code is adapted from what was found on this forum and Wizard-code. It opens at the right form, but not the right record. Public Sub OpenADatabase(ByVal strPath As String, ByVal strFrm As String, ByVal strLC As String) Dim appAccess As Object Set appAccess =...
  11. P

    How to open a form in another database and filter it.

    Does anybody know how to open a form in another database from a current database, filtered for the id of the current record? Much appreciated, Pierre.
  12. P

    Save/secure combobox filter result.

    Wayne, I don't think the answer is there. I've bound the combox to a field on the form (just for that purpose), but it doesn't work. Does it not take very simple coding to change the query to reflect the new number? Pierre.
  13. P

    Save/secure combobox filter result.

    I have a combobox limiting student slots to a certain number on a form 1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;... Private Sub cboName_AfterUpdate() On Error GoTo Err_cboName_AfterUpdate Dim strSQL As String strSQL = "SELECT * FROM qryAssignmentJunction WHERE StudentID <=...
  14. P

    Opening a form from another form

    Would this work for him, Pat? That is if the form for September is "frmSep," and the date-field is called "txtDay" Private Sub Sep1_Click() DoCmd.OpenForm frmSep DoCmd.GoToControl txtDay DoCmd.FindRecord 1 End Sub Private Sub Sep2_Click() DoCmd.OpenForm frmSep...
  15. P

    subform filters on tabbed form

    Sounds like every subform has the same form as Source Object (a property of the subform), which can have only one filter at a time. Try making several different queries, all based on the same main query, and do all the sorting and filtering you want. Instead of using a tab control you can make a...
  16. P

    Problem with SetFocus code

    I tried this tacieslik: Private Sub btnSortByMonthAZ_Click() sfrmSales!fldMonth.SetFocus DoCmd.RunCommand acCmdSortAscending End Sub This code works to the point of setting the focus on the first record in the fldMonth object, but then it gives an error message; Run-time Error...
  17. P

    Problem with SetFocus code

    I believe the problem is the command button is on the main form and the setfocus is to the control on the subform. It works if you put the button on the subform. I've had the same problem, and would also like to know how to do this. - Miles?
  18. P

    Conditional formatting for current week's dates.

    Solution Okay, I adapted the code to have the backcolor of the StartDate object of the form yellow only for the current week, Monday to Sunday. If you want it only until Friday, change the 8 to a 6. Private Sub Form_Open(Cancel As Integer) Dim fcd As FormatCondition With StartDate...
  19. P

    Conditional formatting for current week's dates.

    The large block of coding below successfully conditionally formats the StartDate field's backcolor to yellow from the beginning of the current month to the current date. Private Sub Form_Open(Cancel As Integer) Dim fcd As FormatCondition With StartDate With .FormatConditions...
  20. P

    "All" included in combobox.

    Okay, but I am confused to why there is an error message without the continuation, and not with it? AND What could be wrong in this code when the continuation is not there?
Back
Top Bottom