Search results

  1. ErikSnoek

    Display different form in a subform based on command button...

    On the On Click event of your button add: Name_Of_Your_Subform_Control.SourceObject = "Name_Of_Your_Subform"
  2. ErikSnoek

    Problem with rounding numbers

    Actually, it should be a semi-colon like MStef said. In VBA code it's a comma but MStef told OP to put it in the Control Source property.
  3. ErikSnoek

    List Box Question

    Could you post the query behind the listbox and the code you currently have on the double click event.
  4. ErikSnoek

    Change of fields in Array Module

    Woops sorry about the missing "End If". Did you place it under "Loop"? That's where it should be. On what line are you getting that error? Also, yes you can use a query in OpenRecordset. Just use CurrentDb.OpenRecordset("yourQueryName")
  5. ErikSnoek

    Change of fields in Array Module

    If they are, then couldn't you just use something like this? Function SendRTFFiles() On Error GoTo Err_Command0_Click Dim strSQL As String Dim strFileName As String Dim rstVendors As DAO.Recordset Set rstVendors = CurrentDb.OpenRecordset("SELECT Vendor_No, Vendor_Name FROM...
  6. ErikSnoek

    Change of fields in Array Module

    Aren't these vendors stored in a table?
  7. ErikSnoek

    Change of fields in Array Module

    Show us the part where you assign a value to "cVendorName". It seems a bit weird that you can get the vendor name but have trouble getting the vendor number.
  8. ErikSnoek

    Using VBA to Control Combo Boxes

    Dim rstTable As DAO.Recordset Set rstTable = CurrentDb.OpenRecordset("SELECT Name FROM tblTable", dbReadOnly) If Not rstTable.EOF Then rstTable.MoveFirst Do While Not rstTable.EOF cbxYourComboBox.AddItem rstTable.Fields("Name")...
  9. ErikSnoek

    If not End If query

    You had "Next" on the wrong spot. If you use tabs in your code, these errors are much easier to identify. Dim DQ As String Dim ctl As Control Dim strMbox DQ = """" If Not IsNull(Text409) Then strMbox = MsgBox("Same release for new record?", 4, "Check") If strMbox = 6 Then...
  10. ErikSnoek

    Line numbers in report

    Looking at this purely in a mathematical way, this could do the job. At the textbox with the running SUM, use this as control source: =((yourrunningsumnumber/10)-Int(yourrunningsumnumber/10))*10 or shorter: =yourrunningsumnumber Mod 10 That way, 115 will be shown as 5 and 8768 as 8 (for example):p
  11. ErikSnoek

    Order by TEXTBOX ?

    So you have the column TotalTime (or was it Time_Total) in your query. What keeps you from ordering by that column?
  12. ErikSnoek

    Use of Eval with Access Recordset

    No, you can not use local variables or objects within an Eval expression that way. May I ask why you want to use it that way? Surely we can find another way. Are you perhaps trying this? Debug.Print rsMatter_Details.Fields(!Database_Name)
  13. ErikSnoek

    3 strikes and you’re out

    Do you have this anywhere (preferably at the top) in the same file where you have that sub? Private Counter As Integer If not, add it :)
  14. ErikSnoek

    #Error in field when subform has no records

    Strange, I recreated that scenario in my test database and the field just gets empty when there are no records. But hmm.. perhaps this might work? =nz(frmYourSubform.Form!txtYourTextbox;0)
  15. ErikSnoek

    #Error in field when subform has no records

    How are you getting the total? With Sum? Because then it shouldn't give #Error but just.. emptiness.
  16. ErikSnoek

    New Record Form Load

    I'm not completely sure if I get what you mean but have you linked the the DonorID field on the main form to the DonorID on the subform? This can be done in the Data tab of the properties of the subform. Note: The properties of the subform object, not the properties of the form IN the subform...
  17. ErikSnoek

    Check if another Access is running

    When you use the fnFindWindowLike function, do you use it like this? fnFindWindowLike("YourTitle*") Note the asterisk which indicates that the title should start with "YourTitle" and can have any text behind it.
  18. ErikSnoek

    Find a record and more...

    Ah, I must have missed that part of your question. Check this out: Function yourFunction() As Boolean Dim rstTable As DAO.Recordset Set rstTable = CurrentDb.OpenRecordset("SELECT * FROM yourTable") rstTable.FindFirst "FieldA=1 AND FieldB=2" If rstTable.NoMatch Then 'no...
  19. ErikSnoek

    Wait for External Application...

    This bit Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private booIsAppRunning As Boolean goes in the same file as the code of your events. The "module" that comes with the form. You could place it in a...
  20. ErikSnoek

    Working out totals on a form

    Included a sample database. Check out frmMain and rptMain. Hope this helps :)
Back
Top Bottom