Hi Gurus
Background:
I designed and maintain a case-noting system for my organisation. It is set up so that a shortcut copies the front-end to the users temp directory (only 1 meg so 2-5 seconds at best) and then launches. Backend is MySQL.
Users enter search criteria on the main form (FrmMain) and a list of possible matches is generated in the first listbox (List1). Users then select their preferred client with a click in List1 which then returns a list of case notes in date/time descending order in the second listbox (List2).
As users add case-notes, the form executes a List2.Requery, then iterates with a for/next loop to locate the matching primary key for the newly added case-note, and (ideally) highlights that same case-note to identify the case note currently displayed with its details in List2.
Here are the strange things:
If I am in the database as an administrator, the code that iterates to locate the newly added case note works. If, however, I am in it as a user (and the only user at that, as the front end is in my own temp directory) then it doesn't work - no error, it just doesn't work.
Wierd also that I need to refer to the itemdata as an integer in order for it to match my primary key value in 'y' as both are numerical values.
Unsure exactly what I'm missing here. I've even tried planting a 'DoEvents' at various points within the iteration loop to return control to the OS but with no success.
I'm hoping it's a simple fix but I'm stumped as to why it would work in administrator mode and not in user mode.
Thanks guys (non gender-specific guys, of course!)
Xentaur.
Background:
I designed and maintain a case-noting system for my organisation. It is set up so that a shortcut copies the front-end to the users temp directory (only 1 meg so 2-5 seconds at best) and then launches. Backend is MySQL.
Users enter search criteria on the main form (FrmMain) and a list of possible matches is generated in the first listbox (List1). Users then select their preferred client with a click in List1 which then returns a list of case notes in date/time descending order in the second listbox (List2).
As users add case-notes, the form executes a List2.Requery, then iterates with a for/next loop to locate the matching primary key for the newly added case-note, and (ideally) highlights that same case-note to identify the case note currently displayed with its details in List2.
Here are the strange things:
If I am in the database as an administrator, the code that iterates to locate the newly added case note works. If, however, I am in it as a user (and the only user at that, as the front end is in my own temp directory) then it doesn't work - no error, it just doesn't work.
Code:
Me.List2.Requery
Me.Refresh
For x = 1 To Me.List2.ListCount
Me.List2.SetFocus
If Int(Me.List2.ItemData(x)) = y Then
Me.List2.Selected(x) = True
x = Me.List2.ListCount
End If
Next x
Wierd also that I need to refer to the itemdata as an integer in order for it to match my primary key value in 'y' as both are numerical values.
Unsure exactly what I'm missing here. I've even tried planting a 'DoEvents' at various points within the iteration loop to return control to the OS but with no success.
I'm hoping it's a simple fix but I'm stumped as to why it would work in administrator mode and not in user mode.
Thanks guys (non gender-specific guys, of course!)
Xentaur.