Opening a form from a Pop-up

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a pop-up form I have created so that instructors can double-click on a
user number and a New Student form is supposed to open. I have done several
pop-up boxes to open other forms and they all seem to work just fine.
However, on this particular pop-up, when I double-click a number, I get the
following error message "The specified field '[UserNumber]" could refer to
more than one table listed in the FROM clause of your SQL statement." I am
using a query to draw the information and there is only one table being used
in the query. When I check the SQL statement, I only have one table listed
in the FROM section. There is one difference between the other pop-ups and
this one. The other forms are forms where data has already been entered, but
this one has no data in the form. There is, however, a form with a form
number. Any ideas on what I'm doing wrong?

--Lizasue
 
It's hard to say without seeing your code. What is the code in the double-
click event of the User number? And, what is the recordsource of the popup
form? Is there any code in the On Open event of the popup? Your
observations suggest that the error may not be caused by the on-click event,
but may be in the popup form itself.

Can you provide some details, please?

John

I have a pop-up form I have created so that instructors can double-click on a
user number and a New Student form is supposed to open. I have done several
pop-up boxes to open other forms and they all seem to work just fine.
However, on this particular pop-up, when I double-click a number, I get the
following error message "The specified field '[UserNumber]" could refer to
more than one table listed in the FROM clause of your SQL statement." I am
using a query to draw the information and there is only one table being used
in the query. When I check the SQL statement, I only have one table listed
in the FROM section. There is one difference between the other pop-ups and
this one. The other forms are forms where data has already been entered, but
this one has no data in the form. There is, however, a form with a form
number. Any ideas on what I'm doing wrong?

--Lizasue
 
I have a pop-up form I have created so that instructors can double-click on a
user number and a New Student form is supposed to open. I have done several
pop-up boxes to open other forms and they all seem to work just fine.
However, on this particular pop-up, when I double-click a number, I get the
following error message "The specified field '[UserNumber]" could refer to
more than one table listed in the FROM clause of your SQL statement." I am
using a query to draw the information and there is only one table being used
in the query. When I check the SQL statement, I only have one table listed
in the FROM section. There is one difference between the other pop-ups and
this one. The other forms are forms where data has already been entered, but
this one has no data in the form. There is, however, a form with a form
number. Any ideas on what I'm doing wrong?

--Lizasue

Hi there. Whenever Access gives you an error like that, it's always a
good idea to put in the table or query name from where you're pulling
your data - even if you're only pulling from one table. So instead of
using "UserNumber", use "Tablename.UserNumber".

Let me know if this works for you.

Dorothy
 
Dorothy, that was the ticket! Thanks so much.
--
Lizasue


Dorothy said:
I have a pop-up form I have created so that instructors can double-click on a
user number and a New Student form is supposed to open. I have done several
pop-up boxes to open other forms and they all seem to work just fine.
However, on this particular pop-up, when I double-click a number, I get the
following error message "The specified field '[UserNumber]" could refer to
more than one table listed in the FROM clause of your SQL statement." I am
using a query to draw the information and there is only one table being used
in the query. When I check the SQL statement, I only have one table listed
in the FROM section. There is one difference between the other pop-ups and
this one. The other forms are forms where data has already been entered, but
this one has no data in the form. There is, however, a form with a form
number. Any ideas on what I'm doing wrong?

--Lizasue

Hi there. Whenever Access gives you an error like that, it's always a
good idea to put in the table or query name from where you're pulling
your data - even if you're only pulling from one table. So instead of
using "UserNumber", use "Tablename.UserNumber".

Let me know if this works for you.

Dorothy
 
Back
Top