Search results

  1. pr2-eugin

    Using array to store selected items in list box

    No ! That is not what I meant. Go to the Form Design, click on the ListBox. On the Data tab, you will have the property "Bound Column". The value you currently have is 1, change that to 2. That is all. Then try running your code. If you want to change your code, I think you want is .Column(1)...
  2. pr2-eugin

    newrecord property

    I do not think Macros are capable of doing this. I think it is time for you to move away from Macros ;) Here is how you create a VBA. Click on the Form Design, then find the Form Current Event in the Event Tab. When you click the three dots (...), it will pop up with the option Choose Builder...
  3. pr2-eugin

    Using array to store selected items in list box

    Simplest way is to change the Bound column to 2 rather than 1. Then you will collect emails instead of the names, with the current code.
  4. pr2-eugin

    newrecord property

    Use the Form Current Method. Something like, Private Sub Form_Current() Me.YourButtonName.Visible = Me.NewRecord End Sub
  5. pr2-eugin

    Check if All Forms are closed

    No problem, yes it is missing an End If, but that will not cause any problem here because I have used a single line If statement, (with a line break _) which does not need an End If to terminate the If. Very good suggestion +1
  6. pr2-eugin

    Check if All Forms are closed

    Well I started off with the logic of introducing a flag that could tell if any other form is open other than the two we are concerned about. Somewhere in the middle, I got distracted. Now getting back to the technical reason of why it did not work. (Previous code) The loop checked for all...
  7. pr2-eugin

    Check if All Forms are closed

    Okay, figured my stupidity, :banghead: try this. Private Sub Command98_Click() Dim objAccObj As AccessObject Dim objProj As Object, openFrm As Boolean openFrm = True Set objProj = Application.CurrentProject For Each objAccObj In objProj.AllForms If...
  8. pr2-eugin

    Check if All Forms are closed

    So, if you run this code what happens? Private Sub Command98_Click() Dim objAccObj As AccessObject Dim objProj As Object Set objProj = Application.CurrentProject For Each objAccObj In objProj.AllForms If objAccObj.IsLoaded() And objAccObj.Name <> Me.Name Then 'And...
  9. pr2-eugin

    Check if All Forms are closed

    No hidden forms either? The forms might be loaded, but hidden. If that is the case the code above will not open the Main Form.
  10. pr2-eugin

    Check if All Forms are closed

    Please use Code Tags when posting VBA Code Now you will be getting the error for several reasons, might not be even to do with this routine. Although one problem you will face is referencing the form that you just closed, you have closed the form, which means Me.Name is not accessible. Try...
  11. pr2-eugin

    Check if All Forms are closed

    Getting stuck how? I missed quotes around the form name. Please check my edited code.
  12. pr2-eugin

    Check if All Forms are closed

    You may try something like, Private Sub Command98_Click() Dim objAccObj As AccessObject Dim objProj As Object, openFrm As Boolean openFrm = True Set objProj = Application.CurrentProject For Each objAccObj In objProj.AllForms If objAccObj.IsLoaded() And...
  13. pr2-eugin

    Check if All Forms are closed

    Yes, you can !
  14. pr2-eugin

    Query Expresssion Not Working

    I would suggest not using Is Null, as ZLS are not really Null, so they will fail the condition. Use the following instead. ThirdLineAdd: IIf(Len(Trim([strThirdLineAdd] & "") & "") = 0, "x", [strThirdLineAdd])
  15. pr2-eugin

    Dlookup with multiple condition...

    Would suggest one alteration, use DCount instead of DLookup. Dim strCriteria As String strCriteria = "[LotNo] = '" & Me![LotNo] & _ "' And [Description] = '" & Me![Description] & _ "' And [Invoice] = '" & Me![Invoice] & _ "' And [Customer] = '" &...
  16. pr2-eugin

    Dlookup with multiple condition...

    So something like this? Private Sub Form_Current() Me.Text67 = Nz(DLookup("Balance", "dbo_WbookEdit", "[Lotno] = '" & Me.LotNo & _ "' And [Description] = '" Me.Description & "'"), "N/A") End Sub
  17. pr2-eugin

    Assigning Alphanumeric "Request ID" Based on Form Drop-down Selection

    Would it be possible to post a stripped DB? Please refer to How to Upload a Stripped DB.
  18. pr2-eugin

    Dlookup with multiple condition...

    Are you using this in VBA or on the Form's Design view?
  19. pr2-eugin

    Print report several times by changing field information

    @BlueIshDan, just wondering why is there a need for an Array? When the loop can use the value of i?
  20. pr2-eugin

    Assigning Alphanumeric "Request ID" Based on Form Drop-down Selection

    Hello GWhelan, Welcome to AWF :) Have you looked into DMax + 1 Method? That offers a very similar solution to your question.
Back
Top Bottom