> I developed a database and application using Access 2002 SP3. It utilizes
> quite a few VBA modules, procedures etc.
[quoted text clipped - 7 lines]
> XP
> Pro.

Signature
Joan Wild
Microsoft Access MVP
Hi
1.Well - "none of the code works" ... means that chunks of code such as the
one below will bo nothing! No messages or anything!
However other things such as an event procedure for a form open event will
work ... it contains simple Docmd statements.
2. I will suggest to their sysadmin to install SP3.
3. Right now both the front end and the backend table files (_be) reside in
the network directory. I'm not sure if this is the cause but I will try
moving the front end to each user's machine and leaving the data file on the
network.
Curiously though, on my end (single user) everything runs fine.
Code Sample that Does not work:
Private Sub cmdSaveEthSel_Click()
On Error GoTo Err_cmdSaveEthSel_Click
If IsNull(Forms!frm_CreateResource!OrgID) Then
Interaction.MsgBox "You must have an Organization selected to add
Ethnicities", vbInformation, ""
Exit Sub
Else
If Forms!frm_CreateResource!EthList.ItemsSelected.Count = 0 Then
Interaction.MsgBox "Please choose an Ethnicity and try again.",
vbInformation, ""
Exit Sub
End If
End If
Dim frm As Form, ctl As Control
Dim varItm As Variant
Dim intI As Integer
Dim strSQL As String
Dim MyDB As Database
Set MyDB = CurrentDb
Set frm = Forms!frm_CreateResource
Set ctl = frm!EthList
For Each varItm In ctl.ItemsSelected
strSQL = "INSERT INTO tbl_EthnicitiesServed (EthServedOrgID,
EthID) "
strSQL = strSQL & "VALUES(" & frm!OrgID & "," & ctl.ItemData
(varItm) & ")" & ";"
Debug.Print strSQL
MyDB.Execute strSQL
ctl.Selected(varItm) = False
Next varItm
EthServedList.Requery
Set MyDB = Nothing
Set frm = Nothing
Set ctl = Nothing
Exit_cmdSaveEthSel_Click:
Exit Sub
Err_cmdSaveEthSel_Click:
MsgBox Err.Description
Resume Exit_cmdSaveEthSel_Click
End Sub
>> I developed a database and application using Access 2002 SP3. It utilizes
>> quite a few VBA modules, procedures etc.
[quoted text clipped - 5 lines]
>
>Is there some reason the client hasn't installed sp3?
Joan Wild - 27 Jul 2005 15:26 GMT
> Hi
>
> 1.Well - "none of the code works" ... means that chunks of code such as
> the
> one below will bo nothing! No messages or anything!
You could put a breakpoint in and step through the code to see what's
happening.
> Code Sample that Does not work:
>
[quoted text clipped - 5 lines]
> Interaction.MsgBox "You must have an Organization selected to add
> Ethnicities", vbInformation, ""
This just needs to be
MsgBox "You must.....
Interaction is for use in the Object Browser.
> For Each varItm In ctl.ItemsSelected
>
[quoted text clipped - 4 lines]
>
> Debug.Print strSQL
Is the statement correct in the immediate window? Is the item added to
tbl_EthnicitiesServed?
Put a breakpoint at 'For each varItm...' above and step through the code.

Signature
Joan Wild
Microsoft Access MVP