Search results

  1. P

    Type mismatch error on DMax function using dates

    Been awhile since I've asked a question! (Must mean I'm getting OK at this whole VBA programming thing ;) ) Anyway I've got a type mismatch that I can't figure out. dMaxLstReq = DMax("reqNumb", "FlightLog", "Month([txtDate])='" & frmMonth & "'" And "Year([txtDate])='" & frmYear & "'") In...
  2. P

    Determining a new month, run procedure.

    I've been stumped for the past couple of days trying to discern a method for a form to determine that it's a new month and run a procedure and only run it on month change. My initial thought is: Open recordset move to the last record compare the month in a date field within the last record to...
  3. P

    A solution to a specific front-end updating scenario.

    While the explanation is probably more complicated than the code itself is, I'll try to be brief. I've pulled a lot of information from the net to put all this together into a solution that works for my scenario, but I think it can be modified to fit other weird scenarios. I have an Access...
  4. P

    Populate TextBox with Listbox Selections

    Have a form with a listbox and a textbox. Listbox is multiselect with multiple items. Would like to have the selections from the listbox displayed in the textbox. The code would be under the AfterUpdate event of the listbox. I would also like a separator (comma) in between selections. Searched...
  5. P

    Issue with DateDiff

    I'm having some really weird returns that don't make any sense whatsoever and don't even add up correctly. I've had no luck reading through pages and pages of google searches looking for the solution. I have two text fields on my form.. txtTime1 and txtTime2. Both are set for Short Time...
  6. P

    Help with creating averages field

    Hello! I'm creating a report based off a query. The report lists all of the fields specific to that query. I have one field that is technically a text field under the table design but displays yes/no/not applicable. On the report, it takes all reports with "Yes" listed and displays the result...
  7. P

    Working with times in VB.

    Hey all! I can't find much literature beyond the basics on this subject, or the literature is far more advanced and complicated than I need for this project. I've got a textbox that uses the =DateDiff function to determine the elapsed time between two other textboxes. Essentially what I'm...
  8. P

    Setting values for comboboxes for calculations.

    Me again! Before you ask, I've been reading VBA, VB, Access2010 manuals etc before I post here. I've run into another snag. I have multiple comboboxes on a form with yes, no, not applicable selections. On the referring table they are "text" field types. Once completed it becomes a record in...
  9. P

    Verify compliance.

    Coding question! Form: Combo1 Yes/No Combo2 Yes/No/Not Applicable Combo3 Yes/No Combo 4 Yes/No Not Applicable Textbox label "Compliance?" Textbox "" If any combobox = No then display "No" in vbRed in Textbox If all comboboxes = Yes or NOt Applicable then display "Yes" in compcolor (predefined...
  10. P

    "You can't go to the specified record" error

    Having trouble tracking down an error. I have a form, when a textbox or combobox IsNull or "" then label.forecolor = labelcolor (which is declared variable) and setfocus to blank text/combobox when the "Add Record" button is pushed. Code: Private Sub Form_BeforeUpdate(Cancel As Integer)...
  11. P

    Resetting disabled criteria after record submission.

    Hello all. Here's the layout: Criteria 1: Yes/No/Not Applicable - Enabled Criteria 2: TextBox - Disabled unless Criteria 1 = "No" Code: Private Sub Pain_Elap_AfterUpdate() If Me.Pain_Elap.Text = "No" And Len(Me.Pain_ElapMin & "") = 0 Then MsgBox "Enter total time elapsed if pain is not...
  12. P

    Allowing Ctrl+A in text box.

    Hey everybody. Having an issue with the text boxes. When testing my form and typing information into the text box, Access appears not to like my using the select all shortcut to highlight existing text, say to delete and correct. Is this a property or event, expression, etc that I need to set...
Back
Top Bottom