Still no luck with Dlookup and Access runtime

L

Lasse T

Hello!

I have a database with a simple dlookup funktion. Dlookup gets one record
from a parametar query into a form not based on that query. It works fine in
Access 2000 but not in Acess 2000 Runtime and not in access XP. I have not
tested it in Access 2003 yet. All i get is #Error.

I am able to get the record i need into the query that the form is based on
but it gets too complex so I cannot enter any records.

Can anyone tell me what to do? Is there another way of doing it without
Dlookup?

=DSlåUpp("[OrederNr]";"[kollaOrderForv]")

DSlåUpp are swedish for Dlookup.

I was thinking of language problem but if it was nothing would work. Access
canges Dlookup to Dslåupp by itself.

Thanks in advance

Lasse T
----------------
 
G

Guest

Hi Lasse,

I do not have enough information to help you with MDE or XP question.
But, I can suggest an alternative. Instead of using a DLookup, why not
create a lookup table and join the table by a comment Key.

For example:

MainTable:
Field1 Field2 LookupField
===== ====== ========
AAA A T
BBB B C
CCC C R
..
..
..

LookupTable:
LookupField Description
======== ============
T T Stuff
C C Stuff
R R Stuff
..
..
..

Then your query will join by the field "LookupField" to get your description.

Select MainTable.Field1, MainTable.Field2, MainTable.LookupField,
LookupTable.Description
From MainTable INNER JOIN LookupTable ON MainTable.LookupField =
LookupTable.LookupField;

Hope this helps.
 
L

Lasse T

JL said:
Hi Lasse,

I do not have enough information to help you with MDE or XP question.
But, I can suggest an alternative. Instead of using a DLookup, why not
create a lookup table and join the table by a comment Key.

For example:

MainTable:
Field1 Field2 LookupField
===== ====== ========
AAA A T
BBB B C
CCC C R
.
.
.

LookupTable:
LookupField Description
======== ============
T T Stuff
C C Stuff
R R Stuff
.
.
.

Then your query will join by the field "LookupField" to get your
description.

Select MainTable.Field1, MainTable.Field2, MainTable.LookupField,
LookupTable.Description
From MainTable INNER JOIN LookupTable ON MainTable.LookupField =
LookupTable.LookupField;

Hope this helps.
Hi and thank you for your answer. I think I understand what you mean but i´m
not sure it would work in my case.
I think I need to explain a little better.

A little simplified I have one table Customer and one table Cars wich has a
one to many relationship on the field CustomerNo. Then I have a table Order
wish also have a one to many relationship with the table Customer. One
cusomer - many cars. One cusomer - many orders.

I have a form based on a query with the tables customer and cars. I´m
looking at a customer and his cars and I´m entering data into that form. If
that customer has an unpaid order I want the orderNo to show up in the form
so I dont forget to get paid. I solved that with a parameter query based on
customers and orders, and the query reads the customerNo field in the form.
Then I use the Dlookup funktion to get the orderNo from the query. As I sad,
it works just fine but for some reason it will not work in a runtime
environment. I also used Dlookup in some other places but i managed to get
rid of them. This is the only
obstacle I have left before I can run the database with Access Runtime.

Lasse T
-------------

Lasse T said:
Hello!

I have a database with a simple dlookup funktion. Dlookup gets one record
from a parametar query into a form not based on that query. It works fine
in
Access 2000 but not in Acess 2000 Runtime and not in access XP. I have
not
tested it in Access 2003 yet. All i get is #Error.

I am able to get the record i need into the query that the form is based
on
but it gets too complex so I cannot enter any records.

Can anyone tell me what to do? Is there another way of doing it without
Dlookup?

=DSlåUpp("[OrederNr]";"[kollaOrderForv]")

DSlåUpp are swedish for Dlookup.

I was thinking of language problem but if it was nothing would work.
Access
canges Dlookup to Dslåupp by itself.

Thanks in advance

Lasse T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DLookup 2
Dlookup not working in Access 2002 3
dlookup and string for criteria 5
Type Mismatch in dLookup 9
DLookUp syntax 9
DLookup Missing RecordSource Question 2
Dlookup Problem in Access 2007 1
DLookup 2

Top