Mouse Down

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I have a listbox that is unbound. I need to add records to it if there
are no records in the listbox, So I devised this....I put it on the
Mouse Down event.

If Me.List1.listcount = 0 Then
DoCmd.OpenForm "AddRecords"
Else:
End If

My question is...are there any problem awaiting me using Mouse Down?
Anything I should watch out for? Anything that will come back to bite me?
Thanks
DS
 
DS,

Would you not want the same thing to happen if they used the
keyboard to get to the control? I would think that using the
GotFocus event of the listbox would be more advisable as it
will cover both situations. BTW - your 'Else:' in the IF
statement is a bit superfluous. You would be fine with just
the If...Then and End If if there is no 'Else'.
 
Gary said:
DS,

Would you not want the same thing to happen if they used the
keyboard to get to the control? I would think that using the
GotFocus event of the listbox would be more advisable as it
will cover both situations. BTW - your 'Else:' in the IF
statement is a bit superfluous. You would be fine with just
the If...Then and End If if there is no 'Else'.
Thanks,
Actually, It'll be a touchscreen. Does this cause any problems? Thanks
for the Else: info!
 
I've never designed for a touch screen so I am not an expert
there. If the list is blank would they even touch it to
trigger either MouseDown or Got Focus? You may want to
trigger checking the list for content from the AfterUpdate
event of a previous control that they are required to fill
out and then call your Add form from there.
 
Gary said:
I've never designed for a touch screen so I am not an expert
there. If the list is blank would they even touch it to
trigger either MouseDown or Got Focus? You may want to
trigger checking the list for content from the AfterUpdate
event of a previous control that they are required to fill
out and then call your Add form from there.
I thought of doing it on the previous control, too complicated. This
way if the touch the Add and then the Empty list the form opens, bingo
as easy as pie! I also set up a copy and a paste button, Where they
touch Copy, the item. Then they touch Paste and then the item they are
pasting to. Works well. Thanks for your help.
DS
 
Back
Top