Recent content by ott

  1. O

    array problem

    Sorry, forgot a ")" Form_NewDataEntry.Controls(aryTax(intI)).Locked
  2. O

    array problem

    Try this format when referencing the controls with your string array: Instead of: Forms!NewDataEntry!aryTax(intI).Locked use: Form_NewDataEntry.Controls(aryTax(intI).Locked
  3. O

    Adding from subreport to main report

    Clarify this for me. Do you mean when one or the other field contains a null value? What value do you want to return in this case? Do you want the formula to treat a null value as a 0?
  4. O

    Multiple backend tables with the same name

    Use the code: DoCmd.TransferDatabase acLink, "Microsoft Access", strDBPath, acTable, "TableName", "Alias" Where strDBPath is the full path and name of the database you are linking to (i.e. "C:\Projects\Database1.mdb") and TableName = the name of the table in the target database that you want...
  5. O

    Referencing a subforms controls

    As long as the control name is present on the subform that is the current Source Object of the sub form, the following syntax should work: ParentFormName.subFormControlName.Form.ControlName Or, if you want to assign the name of the control on the sub form dynamically to a string variable: Dim...
  6. O

    Null Dates in SQL strings

    Perhaps I'm misunderstanding what you are trying to do, but this works fine for me: strSQL = "INSERT INTO tblWhatever( Date_Field ) SELECT Null AS NullExpression;
  7. O

    Macro to 'InsertHyperlink'

    Where are you trying to insert the hyperlink? The insert hyperlink menu item is only available to forms and report opened in design view. The dialog works fine if you set the focus on a form opened in design view and then run the code: DoCmd.RunCommand acCmdInsertHyperlink
  8. O

    Adding from subreport to main report

    Result = Val(Me.subReportName.Form.subtxtBoxName) - Val(Me.maintxtBoxName)
  9. O

    help me please

    This simply means that the width of the controls you have placed in a given section of your report (i.e. Detail section, Page Header, etc) is wider than your Page Setup settings. Try widening the margins in page setup, or reducing the width of your widest sections.
  10. O

    Basic Query - long-winded explanation!

    This will dynamically set the SQL statement of your query (in this example called "MyQuery") based on the selection of check boxes on your form (chkA, chkB, chkC and chkD): Private Sub BuildQuery() Dim dbs As Database Dim qdf As QueryDef Dim strWhere As String Dim blnPart(1 To 3)...
  11. O

    autorun

    Shell(pathname[,windowstyle]) WindowStyle Constants: vbHide - Window is hidden and focus is passed to the hidden window. vbNormalFocus - Window has focus and is restored to its original size and position. vbMinimizedFocus Window is displayed as an icon with focus. vbMaximizedFocus -...
  12. O

    Not all records appear in my form

    Are there linked tables in your query? Post the SQL statement for the query and let's have a look.
  13. O

    Text Box Madness...

    You need to have the update occur during the After Update event of our NumberofDonations text box: Private Sub NumberofDonations _AfterUpdate() If Me.NumberofDonations = "25" Then Me.Donation25 = Me.LastDonation End Sub You'll have to work out the exact timing of this as it will depend on...
  14. O

    setfocus

    Try this: Private Sub Pipe_Material_LostFocus() If IsNull(Me![Material Subform].Form![pipe material description]) Then Me![network info source].SetFocus End If End Sub
  15. O

    Not all records appear in my form

    The recordsource for this form is a query? And if so, when you run the query does it display all of the desired records? Is there a logic problem with the query? If this isn't the case then give a few more details and let's see if we can figure it out.
Back
Top Bottom