G
Gary Banks
I use the code below on the before update event of a pop-
up form. I use an ID field to link this data (in the pop-
up's underlying table) to my main data table. The problem
is when the users says No and closes the pop-up form to
return to the still open main form they receive an error
message saying: "There isn't enough free memory to update
the display. Close uneeded programs and try again." Now
all of my users on different PC's receive this error. They
have no other programs open. I checked the memory meter
and there is no change in the available memory. Any
thoughts? Really stumped here. Thanks..
Dim strMsg As String
strMsg = "Data has Changed."
strMsg = strMsg & " Do you wish to save the changes or
create new record?"
strMsg = strMsg & " Click Yes to Save Record or No to
Discard changes."
If MsgBox(strMsg, vbQuestion + vbYesNo, " Save/Create
Record?") = vbYes Then
Me.ModifiedBy = CurrentUser()
Me.ModifiedDate = Date
Else
DoCmd.RunCommand acCmdUndo
'DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, ,
acMenuVer70
End If
If Me.NewRecord Then
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Or ctl.ControlType =
acComboBox Then 'Others include acLabel, acListBox,
acComboBox, acCheckBox etc
ctl.BackColor = 16777215
Forms![frm_Center].AllowEdits = True
End If
Next
Else
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Or ctl.ControlType =
acComboBox Then
ctl.BackColor = 12632256
Forms![frm_Center].AllowEdits = False
End If
Next
End If
up form. I use an ID field to link this data (in the pop-
up's underlying table) to my main data table. The problem
is when the users says No and closes the pop-up form to
return to the still open main form they receive an error
message saying: "There isn't enough free memory to update
the display. Close uneeded programs and try again." Now
all of my users on different PC's receive this error. They
have no other programs open. I checked the memory meter
and there is no change in the available memory. Any
thoughts? Really stumped here. Thanks..
Dim strMsg As String
strMsg = "Data has Changed."
strMsg = strMsg & " Do you wish to save the changes or
create new record?"
strMsg = strMsg & " Click Yes to Save Record or No to
Discard changes."
If MsgBox(strMsg, vbQuestion + vbYesNo, " Save/Create
Record?") = vbYes Then
Me.ModifiedBy = CurrentUser()
Me.ModifiedDate = Date
Else
DoCmd.RunCommand acCmdUndo
'DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, ,
acMenuVer70
End If
If Me.NewRecord Then
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Or ctl.ControlType =
acComboBox Then 'Others include acLabel, acListBox,
acComboBox, acCheckBox etc
ctl.BackColor = 16777215
Forms![frm_Center].AllowEdits = True
End If
Next
Else
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Or ctl.ControlType =
acComboBox Then
ctl.BackColor = 12632256
Forms![frm_Center].AllowEdits = False
End If
Next
End If