You Cancelled the previous Operation 2001

  • Thread starter Thread starter Nancy Carol
  • Start date Start date
N

Nancy Carol

I have worked on this for 21 straight days.

I cannot count the nuber of things I have done. Reload Access 97, Access
2000, even tried Access on Vista and am currentlly running Offiice 2002.

I have rebuilt my database about 25 times.

Still get the same message.

I tried firing the instruction with a command button - Failed.
Tried on Get Focus - Failed
Tried on Current Event - Failed
Tried on Activate Event - Failed.

Below are three commands I have used.

Dim strUniv As String

strUniv = Me!UNIVCODE

' Me!TextUV = DLookup("[UvName]", "UNVRSTY", "[GCUVCDE] = " &
strUniv)
The above code fails.

Original Code

Me!TextUV = DLookup("[UvName]", "UNVRSTY", "[GCUVCDE] = " &
Forms!CarolV!UNIVCODE)

This code fails.

Me!TextUV = DLookup("[UvName]", "UNVRSTY", "[GCUVCDE] = 'WYO'")

As a test the above code works!

Any Ideas are welcome.

Thank You in Advance

Nancy Carol
 
Nancy said:
I tried firing the instruction with a command button - Failed.
Tried on Get Focus - Failed
Tried on Current Event - Failed
Tried on Activate Event - Failed.

Below are three commands I have used.

Dim strUniv As String

strUniv = Me!UNIVCODE

' Me!TextUV = DLookup("[UvName]", "UNVRSTY", "[GCUVCDE] = " &
strUniv)
The above code fails.

Original Code

Me!TextUV = DLookup("[UvName]", "UNVRSTY", "[GCUVCDE] = " &
Forms!CarolV!UNIVCODE)

This code fails.

Me!TextUV = DLookup("[UvName]", "UNVRSTY", "[GCUVCDE] = 'WYO'")

As a test the above code works!


The difference between the one that works and the others is
the apostrophes. To put them in the other ones,try using:

Me!TextUV = DLookup("UvName", "UNVRSTY", "GCUVCDE = '" &
Forms!CarolV!UNIVCODE & "' ")
 
Thank You, It Works.

I could not find a single example that showed me what you did. I understand
what I was doing wrong now.

Hope you have a great Halloween!

Nancy Carol

Marshall Barton said:
Nancy said:
I tried firing the instruction with a command button - Failed.
Tried on Get Focus - Failed
Tried on Current Event - Failed
Tried on Activate Event - Failed.

Below are three commands I have used.

Dim strUniv As String

strUniv = Me!UNIVCODE

' Me!TextUV = DLookup("[UvName]", "UNVRSTY", "[GCUVCDE] = " &
strUniv)
The above code fails.

Original Code

Me!TextUV = DLookup("[UvName]", "UNVRSTY", "[GCUVCDE] = " &
Forms!CarolV!UNIVCODE)

This code fails.

Me!TextUV = DLookup("[UvName]", "UNVRSTY", "[GCUVCDE] = 'WYO'")

As a test the above code works!


The difference between the one that works and the others is
the apostrophes. To put them in the other ones,try using:

Me!TextUV = DLookup("UvName", "UNVRSTY", "GCUVCDE = '" &
Forms!CarolV!UNIVCODE & "' ")
 
Back
Top