Search results

  1. T

    Access Help for AcCommands?

    Just use docmd.Minimize
  2. T

    subform tab control

    This should do it Private Sub LastField_Exit(Cancel As Integer) Me.Next_subform.SetFocus End Sub
  3. T

    Toggle Box and Queries

    When you run the queries - which incidentally are called Action queries, you may get a warning message. If you want to switch them off, then as the first line of the toggle click event add DoCmd.SetWarnings False and before the Exit Sub. DoCmd.SetWarnings True
  4. T

    how to requery mainform from popupform?

    So the Public Variable needs to be Public intIDref as integer and the Filter line needs to be DoCmd.OpenForm "F-Your Main Form", , , "[ID_Ref] = " & intIDRef
  5. T

    Toggle Box and Queries

    When the Toggle Buton is clicked it has either the Value 0 or -1. So, your code on the click event should be something like this: Make its Record Source Toggle1 in your forms table; unless you want the Toggle to be generic across all records, in which case leave it blank. If toggle1.value = 0...
  6. T

    Assigning picture on selection

    Got some code for this. I will put it up in a couple of hours when I get home and look in my archive!
  7. T

    how to requery mainform from popupform?

    Probably several ways but one way I use would be close the main form as the Pop Up opens, select the record and as this is done, make the record = to a public variable and the re-open the main form but filter it using the variable. Put the Public Variable in a Module with this code at the top...
  8. T

    Button with Message Pop Up

    See my amended response
  9. T

    Button with Message Pop Up

    Use the msgBox function Before the final event e.g. Dim iResponse as Integer iResponse = MsgBox("Ask the Question?", vbOKCancel, "Message Box Title") If iResponse <> 1 Then ' 1 is OK 2 or X is Cancel ' Do something like Cancel = True or Exit Sub...
  10. T

    Updating query

    Thats some fantastic calculation in the Available Days field. I wouldn't know where to start. It needs to be simplified into smaller calcultaions that progressively lead from one to the other. Hopefully you will then be able to pick the result and deduct the Days per Week field without...
  11. T

    Button with Message Pop Up

    In Design view, right-click the button, select the On Click event, press the elipsis .. select code builder and then drop the code in. After you have coded one event, you can get to the Visual Baisc Editor by selecting the code icon in the top toolbar. This is the squarer with the coloured sides.
  12. T

    numbers only input mask, if checking for number

    Have yopu tried the IsNumeric finction? This may help trap the alpha characters. Private Sub Text1_Exit(Cancel As Integer) If IsNumeric(Text1.Value) Then MsgBox "ok" Else MsgBox "Alpha" End If End Sub
  13. T

    Creating a text box using a command button

    This seems to work Create a Function in a Module Function NewBox() On Error GoTo NewBox_Err DoCmd.OpenForm "Form1", acDesign, "", "", , acNormal Dim frm As Form Dim Box As Control 'Set frm = Form1 Don't need this line Set Box = CreateControl("Form1", acTextBox, , , , 1000...
  14. T

    Creating a text box using a command button

    I take your point but unless you wish to allow an unlimited number of new text boxes, I would still do as I suggest and make them visible at the appropriate time. If you need to move them about, then code can be used to do that. Just a thought.
  15. T

    Creating a text box using a command button

    Why not put the text box on the form; set its Visible Property = False and then use the Command Button to change the Visible property = True?
  16. T

    Avoiding duplicate records

    A neat way to check for duplicate records separately one at a time as follows: Private Sub CheckData() ' (be careful with the syntax - it is ' " & strField & " ' " without the spaces If (Not IsNull(DLookup("[Field]", "Table", "[Field] = '" & strField & "'"))) Then...
  17. T

    Making it only display what I want in the Report

    Create a New Module - call it modPublic Variables One line of Code Public strRegNo as String Close and Save
  18. T

    Making it only display what I want in the Report

    Sounds like you need to filter the report. Create a Public Variable called strRegNo. Then either pull the RegNo from a list of them in a select from dialog form e.g. [Reg].SetFocus strSearch = [RegNo].Value or use an InputBox e.g. strRegNo - inputbox$("What is the Reg No.") You may need...
  19. T

    Query or Code ??

    A query is generally always easier for the beignner than code. The more experienced programmer uses code.
  20. T

    Show MsgBox rather than Standard Access Error

    Hope this will do it. Couple of things - you will need to distinguish between an existing and a new record. I use a Public Variable called strNewRecord which needs to be set to "Yes" when the new Record is called. You will need to find a suitable way of identifying when a New Record is being...
Back
Top Bottom