Kamis, 20 Oktober 2011

RE: [MS_AccessPros] Control Source using DLookup

 

Connie-

ALWAYS choose Compile from the Debug menu after making any code changes. That
would have found your missing End If.

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of mrsgoudge
Sent: Thursday, October 20, 2011 8:53 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Control Source using DLookup

Thanks John! This thread was worth it to get to know the Immediate window
better.

I had been entering code and neglected to put an End If in. Once that was
corrected the DLookup works.

Connie

--- In MS_Access_Professionals@yahoogroups.com, "John Viescas" <john@...> wrote:
>
> Connie-
>
> Do you reference HomeInfoID anywhere else on the form? You could also go to
the
> Immediate Window (CTRL+G) and enter:
>
> ? DLookUp("[HomeInfoID]","Listings","[ListID] = x")
>
> .. where x is some number that you know is in the table. Press enter, and it
> should return the HomeInfoID for that record.
>
> John Viescas, author
> Microsoft Office Access 2010 Inside Out
> Microsoft Office Access 2007 Inside Out
> Building Microsoft Access Applications
> Microsoft Office Access 2003 Inside Out
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
>
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of mrsgoudge
> Sent: Thursday, October 20, 2011 8:26 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: Re: [MS_AccessPros] Control Source using DLookup
>
> John,
> HomeInfoID is in the Listings table.
> Connie
>
> --- In MS_Access_Professionals@yahoogroups.com, "John Viescas" <john@> wrote:
> >
> > Connie-
> >
> > Is HomeInfoID in "Listings"?? DLookup builds a query:
> >
> > SELECT HomeInfoID
> > FROM Listings
> > WHERE [ListID] = <the value of the control on your form>
> >
> > If HomeInfoID isn't in Listings, then that's the problem.
> >
> > John Viescas, author
> > Microsoft Office Access 2010 Inside Out
> > Microsoft Office Access 2007 Inside Out
> > Building Microsoft Access Applications
> > Microsoft Office Access 2003 Inside Out
> > SQL Queries for Mere Mortals
> > http://www.viescas.com/
> > (Paris, France)
> >
> >
> >
> > -----Original Message-----
> > From: MS_Access_Professionals@yahoogroups.com
> > [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of mrsgoudge
> > Sent: Thursday, October 20, 2011 8:06 PM
> > To: MS_Access_Professionals@yahoogroups.com
> > Subject: [MS_AccessPros] Control Source using DLookup
> >
> > Hi all!
> >
> > In case it's relevant I am using Access 2007. I recently figured out that
> > DLookup can be used as a Control Source. I had the following working, but
> when
> > I just opened up the form it is not. Before the form opens there's a needs
> > parameter message asking for HomeInfoID. And once the form opens the box
has
> > "?Name" in it. Here's what I have in the Control Source box:
> >
> > =DLookUp("[HomeInfoID]","Listings","[ListID] = " & [ListID])
> >
> > Thanks,
> > Connie
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar