Search results

  1. Pyro

    Blank pages in Report

    Is there a page break after your subreport? If so, it might work to set the pagebreak control to invisible in the .hasdata test.
  2. Pyro

    Outlook subject line to database

    Below is the code from my example with mail item sorting highlighted in blue. Private Function GetReqs() As String On Error GoTo Err_Handler Dim objOutlook As Object Dim objNameSpace As Object Dim objFolder As Object Dim objItems As Object Dim objMailItem As Object Dim strRow_Source As String...
  3. Pyro

    Outlook subject line to database

    Attached is an example of loading Outlook data into a listbox from Access. It should give you some idea of how to achieve what you are after. A few notes: 1. This example uses late binding, so a reference to the Outlook Object Library is not required. 2. The data is loaded into the listbox as...
  4. Pyro

    Blank pages in Report

    If you have the srpt in its own group, you should be able to set the visibility for the entire group, which should give you the desired result. If me.<yoursrpt>.Report.HasData then me.<mygroup>.visible = True Else me.<mygroup>.visible = False End If
  5. Pyro

    Blank pages in Report

    You can set the height of the subreports to 0, and if there are multiples, stack them close to each other. Alternatively, you could place them in their own group and set the visible state of that group to false when the srpt has no data.
  6. Pyro

    Outlook subject line to database

    It is possible. I have done this sort of thing directly through Outlook using an add-in developed in Visual Studio Tools for Office. You could also just create a userform in Outlook to do the same thing, but if other users need to use it, then distributing it can be a pain in the neck. It is...
  7. Pyro

    Test Whether an Update Query has Changed Records

    I think for the scenario of "will the query change records", you would need a select query first to determine the number of records that might be effected. To see the number of records that were changed: Dim db As DAO.Database Set db = CurrentDb() db.Execute "<your stored query name, or SQL...
  8. Pyro

    Query in "criteria" in VBA code

    Just beware of the possibility for your search string to already contain quote marks. Example: searching for a surname like O'Neil. This will throw an error and not return a result. I always pass my criteria through a function that escapes quotes: 'Escape quotes Public Function...
  9. Pyro

    Query in "criteria" in VBA code

    To expand on arnelgp's post: dim db as DAO.Database dim rs as DAO.Recordset dim strSQL as String dim strSearch as String set db = Currentdb() strSearch = "Some criteria" strSQL = "SELECT * FROM yourTable WHERE [test] like '" & strSearch & "*';" Set rs = db.OpenRecordset(strSQL...
  10. Pyro

    opening a form from another form based on textbox value

    If your field is alphanumeric, then in the code as per my example, just replace this line: DoCmd.OpenForm "frm_Employee", , , "EmployeeID = " & Me!EmployeeID with: DoCmd.OpenForm "frm_Employee", , , "EmployeeID = '" & Me!EmployeeID & "'" Note the extra single quotes.
  11. Pyro

    opening a form from another form based on textbox value

    Attached is a real quick example I put together for you. I'm not sure what version of Access you're running, so i saved it in 2000.
  12. Pyro

    opening a form from another form based on textbox value

    The following should work: DoCmd.OpenForm "<Employee Form>" , , , "EmployeeID = " & Me!EmployeeID Replace <Employee Form> with the name of your employee form. Note that you may need to save the record first if it is a new record that has not yet been committed. Alternatively, you could...
  13. Pyro

    Export to Excel for quotes

    You mentioned in post #7 that qli_supplier is a numerical ID foreign key. Unless i am misinterpreting something, the reason... Rstsupplier.findfirst "Supp_Name='" & rstqlivAt!qli_supplier & "'" ...is not working is because essentially you are saying "hey access, show me the the first supplier...
  14. Pyro

    Check Box On Form - Select All Records

    Glad you are happy with your result. One thing i might suggest is clearing the "finish" listbox when an alternate color is displayed. If i click on Bamboo Tile > Desert > Gloss, then change the Color to *Show All, the previously selected finish is retained. Maybe this is the desired outcome...
  15. Pyro

    Custom ribbon action button not working with vba

    You need to create a public object variable that will point to your ribbon Public IRibbonControl As IRibbonUI Then load it in at start up Public Sub OnRibbonLoad(objRibbon As IRibbonUI) On Error GoTo Err_OnRibbonLoad Set IRibbonControl = objRibbon Exit_OnRibbonLoad: Exit Sub...
  16. Pyro

    Open form with dynamic record source (query)

    Note that in my example, there is only one query, and the two buttons manipulate the SQL within it and update the source object of the sfrm.
  17. Pyro

    Open form with dynamic record source (query)

    Create a subform on your popup that completely fills the bounds of the popup form. Subforms can have a query set as the source object, and will just display the query as a datasheet. See example. (apologies if the example is a little messy - i have a grumpy one year old sitting on my lap...
  18. Pyro

    Check Box On Form - Select All Records

    There are a ton of ways to do this. Attached are two quick examples. Test 1 takes the reverse path of displaying all colours when a series is first selected, then drills down once a colour is selected. Test 2 is slightly more complicated and uses a union query to show "*Show All" at the top of...
  19. Pyro

    Add New Record To Subform (Related Table) via VBA

    You need to save the parent record before adding sub-records. Dim rs As DAO.Recordset Dim x As Long Set rs = Me.sfProduct.Form.RecordsetClone Me.member_id = "New Member" Me.first_name = "New First" Me.last_name = "New Last" x = 1 'Save here DoCmd.RunCommand acCmdSaveRecord Do If x =...
  20. Pyro

    Coloring Excel cells on export

    There are several options. Here are a couple. 1. Rather than create a new Excel workbook each time, you could store a pre-formatted template that you export your data to. The template would already have conditional formatting on the column that stores your boolean value. 2. Once your current...
Back
Top Bottom