Really Weird Unexplainable Error!

Create a new database, import the relevant parts, and then save as previous version. Access '97 format
 
I'm not sure if this will work, I opened a new database and copied relevant bits over but it didn't give me any option on which version of Access it would be...

From frmMain, click Add New Subscription User. Then Click Contact Not Listed button on FrmSelectContact and the best organisation to select is BBC. Same thing happens...

:(
 

Attachments

Na, didn't work.
 
Have converted to A97 but forum won't let me upload it, says it's too big! It's 297KB. Deleted records and as many queries as poss...
 
I've Worked Out What...

... but can't work out why!

I changed FrmSubUser1 so that it didn't open in Dialog format and it's ok now... why would that make a difference? I don't understand...
:confused:
 
If a form is opened as a Dialog form (like a message box) then I don't think you can perform any other operations ntil the form is closed.

Certainly, in code, when you open a form in dialog mode, all code that follows the DoCmd.OpenForm "bla bla" line is not executed until the dialog form is closed which doesn't happen if a form is not dialog (if a form opens normally, all code after the form open code is executed too.
 
Thanks. That's a valuable lesson to learn actually!.
;)
 
Oh Lord It's Doing It Again!

Only this time there's no dialog form present anywhere!

I'm using the following code:

Function AttachSubUser()
Dim strSQL As String
Dim strOpenForm As String
Dim strCloseForm As String
Dim lngContactID As Long
Dim intOrgID As Integer

lngContactID = Forms!FrmSelectContact!txtSelectedContact.Value
intOrgID = Forms!FrmSelectContact!txtSelectedOrgID.Value
strOpenForm = "FrmSubscriptions"
strCloseForm = "FrmSelectContact"
strSQL = "OrgID = " & intOrgID & ""

DoCmd.Close acForm, strCloseForm
DoCmd.OpenForm strOpenForm, , , strSQL
Forms!FrmSubscriptions!txtContactID = lngContactID

End Function


It runs fine but then gives me an error message at the end saying it can't find FrmSelectContact. If I REM out the line to close that form It runs fine but the form is left open. Any ideas?
 

Users who are viewing this thread

Back
Top Bottom