Re: Control Source/Record Source issue
- From: "Annemarie" <AnnemarieHarding@xxxxxxxxx>
- Date: 28 Nov 2006 09:39:16 -0800
Thanks Tina!
I have been playing with DLookup all morning and have not been
successful yet. I have never used this function... I will post what I
have been trying and hopefully someone can help me problem solve.
I have tried three different methods... (I know Calculation is spelled
wrong..I have to go through my database and fix it everywhere just
haven't had the time yet...)
1. I attempted to put the following code in the control box of an
unbound text box to pull the correct NTG. No luck
= DLookup("[NTG]", "Calcluation Lookup Table TEST", "[num] = " _&
Forms![Add New Subs]![Num])
2. I attempted to put the following code in the before update event of
a textbox bound to subfunctions.ntg (the field i want the value to
store in). I took the sample code from the help function and adapted
by my fields...
Dim varX As Variant
varX = DLookup("[NTG]", "Calcluation Lookup Table TEST", "[num] = " _
& Forms![Add New Subs]![Num])
3. I attempted to put the following code in the record source of a
textbox bound to subfunctions.ntg.
= DLookup("[NTG]", "Calcluation Lookup Table TEST", "[Me]![num] = " _ &
Forms![Add New Subs]![Num])
What am I missing? I do not have an experience with DLookup...can
someone help me?
Again, I want to take the "library" value from Calcluation Lookup Table
TEST.NTG and be able to revise and store it in Subfunctions.NTG I
have tried pulling it in as default but no luck.
Thanks,
Annemarie
tina wrote:
read up on the DLookup() function in Access Help; it may give you what you
need.
hth
"Annemarie" <AnnemarieHarding@xxxxxxxxx> wrote in message
news:1164668074.202829.199060@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have been trying to pull a value from one table (ex [Lookup
Table].[NTG]) on a form and have that value be a baseline. I would
like this number to store in a field in another table (ex
[Subfunctions].[NTG]) this way the user can change the value if needed
for a specific record and not change the pre-set "library" value.
I have tried using [Lookup Table].[NTG] as the Default, and
[Subfunctions].[NTG] as the control source but the number will not pull
in. The form is based on a query that includes both values, so i have
tried to filter the form and have the value pull into the the
[Subfunctions].[NTG] from either that forms' [Lookup Table].[NTG] or a
previous forms' [Lookup Table].[NTG] ...previous form based on same
query. I am not having any luck.
I have the form filtered based on another field value already. The
reason I have to have the second form is to enter additional data based
on the first form...but there are two different forms asking for
different data that pop up based on the value in a field on the first
form. How do I pull this value from one table and store it in another??
.
- Follow-Ups:
- Re: Control Source/Record Source issue
- From: tina
- Re: Control Source/Record Source issue
- Prev by Date: Re: filter date
- Next by Date: Re: Save parent form after transaction update
- Previous by thread: Re: filter date
- Next by thread: Re: Control Source/Record Source issue
- Index(es):
Relevant Pages
|