Search results

  1. H

    Require OLE object on Input Form

    Hi All, I'm trying to figure out how to require an OLE Object in the BeforeUpdate of my Access 2010 input form. The ole object is named ExecutedContract. I'm not sure how to integrate this piece of code with what I have so far. I'm also having trouble finding anything on the web. Private...
  2. H

    Export Excel file but first ask for date range

    Hi All, I've set up a command button to export my query to an excel file but I'm not sure how I can ask for the date range before the file is exported? I have this for code: Private Sub Command5_Click() DoCmd.OutputTo acOutputQuery, "QryMaster", acFormatXLS End Sub And I have this code for...
  3. H

    Trouble with onClick

    Hi All, I have a database with two tables and two forms. FormA arrives prior to a Contract. FormB arrives post Contract. FormA and FormB are actual names of forms in our office. ContractNo is the FK for both. On my dashboard, I have a search for FormA. When clicking the command button...
  4. H

    Want Form A field to flood into Form B Field

    Hi, I'm trying to flood the ContractNo from FormA into the ContractNo for FormB with an onclick command. My syntax is probably off and was wondering if someone could assit? stDocName = "FormBSearch" DoCmd.OpenForm stDocName, , , stLinkCriteria Forms!FormBSearch!Me.ContractNo =...
  5. H

    Can Access generate emails based on record's date

    Hi All, Using Access and Outlook 2010. Not sure if this should have been posted in 'Queries' or 'Modules/VBA' so I apologize if it's in the wrong spot. I have a database that tracks Contracts for our University. One of the fields it tracks is Expiration Date. Is there a way to have...
  6. H

    Form validation based on Yes/No selection

    Hi All, It was recommended to put this in a fresh thread since it is a new problem. I inquired on this original thread (http://www.access-programmers.co.uk/forums/showthread.php?t=219821&page=2) to hide/show fields based on two Yes/No dropdowns. This was accomplished thanks to BL. Summary...
  7. H

    All objects toolbar opens when i hit print button on form

    Hi All, Using Access 2010. I purposely disabled the Access Objects when opening my database for added security. This works. The problem I'm having is when I use the print button (access macro) on one of my forms, as soon as i click the button, the "all access objects" window opens on the...
  8. H

    Unbound textbox won't print

    I have an unbound textbox on a form that pulls a searched number from the previous form. Works perfect except it doesn't print. I've been searching around and can't find the solution. This is part of my code from my OnClick button to open the form I am talking about above...
  9. H

    Text box must equal one of these characters or error

    Hi All, Trying to figure out how I would do this without creating an additional table.. I have a field called "SurfCode". I do not want this to be a combo box but instead allow the user to enter into a text field and if they enter a single character that doesn't equal...
  10. H

    Have a combobox that I don't want to act like a Combobox

    Hi, I have a DepartmentNumber field on my InputForm (for tblMain) that is a combobox with department numbers. This combo box looks up tblDept. I also have "On Not in List" code for this DepartmentNumber field so that if a user enters a department number that doesn't exist, a sub form opens...
  11. H

    Clear field after duplicate or invalid entry

    Hi, I have this code: Private Sub AssetNumber_BeforeUpdate(Cancel As Integer) Dim Answer As Variant strIdNumber = Me.AssetNumber Answer = DLookup("[AssetNumber]", "tblMain", "[AssetNumber] = '" & Me.AssetNumber & "'") If Not IsNull(Answer) Then MsgBox "Duplicate Asset Number Found." &...
  12. H

    How would I put these two BeforeUpdates together

    Hello, How would I put these two BeforeUpdates together? Private Sub LastMissingDate_BeforeUpdate(Cancel As Integer) If LastMissingDate.Value > Date Then MsgBox ("Last Missing Date cannot be greater than Today's Date!") Cancel = True End If End Sub Private Sub...
  13. H

    Query criteria for first two digits of a 10 digit field

    Hi, I have a field in every record called UNSPSC which is a 10 digit code. I want to be able to search by UNSPSC with only the first two digits of my searched number to retreive matching UNSPSCs. (I have a method to my madness for doing it this way) I.E. I search the UNSPSC 0123456789...I...
  14. H

    Password to delete record

    HI, I set up a password on a delete record button to ensure the end user knows they are about to delete a record. I used the password "delete". So when I hit the delete button at this moment, a password prompts the user and if they type "delete", a message box displays saying something along...
  15. H

    Date calculations

    Hi, On an access 2010 form, I have created a formula to calculate the "Year" difference between two dates and I want to add this difference to one of my form fields that feeds my table. I am probably approaching this wrong but this is what I have done. Added a hidden text field "Text12"...
  16. H

    Making sure form fields are filled in or error

    Hello, I have this code executed when I hit my Save button. It works fine but I just added an additional field SFSID that isn't required each time. If I leave it blank, I still get the error message and can't save my record. I'm not sure how I would exclude one field with my given code...
  17. H

    stLinkCriteria issue

    Hi, I've attached two photos to make this explination a bit easier. On my main form (when the database opens) allows the user to search by Fed ID using a textbox and a button with code which will return all records that match that FED ID and fall within a year from Today's date. Photo 1...
  18. H

    Store Dlookup Value in table

    Hello All, Access 2003. Edit: These fields are on my input form. I have a field called "GeneratedItemNumber" in my table "tblMain". This field uses a number field "MyNumber" and a category field "Category" and combines these values using this code in the generateditemnumber control source...
  19. H

    Combining an autonumber field and a text field to show in a third

    Hi All, Access 2003. I have an online web shop where I need to create a database to store my items. I need to generate item numbers combining my autonumber field and my category abbreviation field. For example, the second item to be added into my database is a computer. I select computer...
  20. H

    I have set a password with "on click", how do I show "*" when entering it

    I have set a password with "on click", how do I show "*" when entering it Hi All, I created a password "josh" on one of my form buttons on click property. How do I encrpyt it (I hope im using the right terminology) when someone clicks the button and begins typing the password. In other...
Top Bottom