Form Not Opening

Thumper75

Registered User.
Local time
Today, 10:00
Joined
Feb 6, 2017
Messages
37
Hi everyone,

I have a form that will not open when I call it.

Code:
DoCmd.OpenForm "frm_Log_Results", acNormal

The code looks right but I keep getting a Run Time Error 3008. Something about not being able to open the table programmaticly. The form is a columnar style with a function button that I haven't programmed yet. I changed to a different form once and that seemed to work, but when I went back to the Results form I get the error.

Any ideas?
 
Hi,

Can you open the form manually?

Just curious...
 
The direct answer is yes. And it displays as it is supposed to. Hence my confusion. I did however change the name of the form recently to better reflect its purpose. And before you ask, yes I did make sure that the form name and what is in the VBA matched.
 
The RecordSource of the Form being opened is not also the RecordSource of the calling Form...or part of the RecordSource of the calling Form, is it?

Linq ;0)>
 
This is a good point. If I understand the question correctly I think the answer is yes. Both the from being called and the form it is being called from have the same record source "tbl_Log_Pages".

Is this what is causing my problem?
 
I just tested your scenario by creating a duplicate copy of a form then adding a button on the first to open the second form. It worked with no error

I even tried opening both the table and an action query based on the table before clicking the button. It still worked fine

Try adding code to close the existing form first:
Code:
 DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "frm_Log_Results"
 
Actually the first form is just search parameters that the user can select from. Really doesn't even need a control source, just the right code. As soon as I removed the control source from the form the initial code that I put in worked just find. Now to figure out how to use the WHERE clause in the OpenForm function.
 
Hi Thumber75,
I had the same issue before.
Try to change the (bound Column) to 1 under the (data) in the property Sheet.
Hope this would help.
 
Error 3008 is frequently telling you about a conflict of usage. Perhaps the form was not using Optimistic Locking or No Locks AND you had something else that tried to open the same recordsource with exclusive access. So there was a conflict of having two paths open to the same table at the same time in a way not compatible with sharing.
 
Hey, guys...you realize that this thread is almost 6 months old?:D

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom