17673 Search/Find Record dlookup
Sign Up |  Live StatsLive Stats    Articles 37,313| Comments 177,055| Members 19,399, Newest hsingh777| Online 482
Home Contact
 (Forgotten?): 
    Sikhism
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Search/Find Record dlookup

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 100 USD (20%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
Police force blows £100,000 on failed search to find a helmet to cover Sikh officer's Sikh News Reporter Sikh News 1 16-Jun-2008 14:31 PM
Record Find Problem robert.f.smith@sbcglobal.net Information Technology 8 28-Jul-2006 08:28 AM
Find last record Chris Stewart-Campbell Information Technology 7 28-Jul-2006 08:27 AM
Go to retrieved record from search result lindsay_105 Information Technology 0 28-Jul-2006 08:23 AM
Setup find in subform with fast search default105 Information Technology 1 28-Jul-2006 08:19 AM


Tags
dlookup, record, search or find, searchfind
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:13 AM
lmv's Avatar lmv
Guest
 
Posts: n/a
   
   
Search/Find Record dlookup

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
I am using the FIND code below and it works well on all but the "requestedby"
(which is a combo box which is viewed as a name but stored as a number.)
SELECT DISTINCT Overseer.OverseerID, Overseer.LastName, Overseer.FirstName,
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/10461-search-find-record-dlookup.html
Overseer.Department FROM Overseer WHERE (((Overseer.LastName) Is Not Null))
ORDER BY Overseer.LastName, Overseer.Department;

I want to be able to search in this code by the name. I tried the following
after the first error handler. I don't know where it should go (I get error
2001, previous ... xceled)

'lookup value for "requestedby"
RequestedBy = DLookup("[LastName]", "Overseer", "[OverseerID]='" &
Forms!OrdersWDetails!RequestedBy & "'")

Thanks in advance!
lmv

'--------FIND CODE---------
Private Sub FindRecordLike(strFindMode As String)
'Copyright 2003 J Street Technology, Inc.
'www.JStreetTech.com
'May be used and distributed without permission if these 3 lines are included.
On Error GoTo Error_Handler

'PO number shows up in search additional fields show up as ID numbers
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10461
Call jst_FindRecord(frmCallingForm:=Me, _
ctlFindFirst:=Me!cmdFirst, _
ctlFindNext:=Me!cmdNext, _
ctlSearchText:=Me!txtFind, _
ctlSearchOption:=Me!optFind, _
strFindMode:=strFindMode, _
strField1:="ProjectID", _
strField2:="PurchaseOrderNumber", _
strField3:="RequestedBy")

Exit_Procedure:
Exit Sub
Error_Handler:
MsgBox Err.Number & ", " & Err.Description
Resume Exit_Procedure
Resume
End Sub




Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:13 AM
Dirk Goldgar's Avatar Dirk Goldgar
Guest
 
Posts: n/a
   
   
Re: Search/Find Record dlookup

"lmv" wrote in message
news:58230150-E262-45D4-9276-FE4BBC463F73@microsoft.com
> I am using the FIND code below and it works well on all but the
> "requestedby" (which is a combo box which is viewed as a name but
> stored as a number.) SELECT DISTINCT Overseer.OverseerID,
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10461
> Overseer.LastName, Overseer.FirstName, Overseer.Department FROM
> Overseer WHERE (((Overseer.LastName) Is Not Null)) ORDER BY
> Overseer.LastName, Overseer.Department;
>
> I want to be able to search in this code by the name. I tried the
> following after the first error handler. I don't know where it should
> go (I get error 2001, previous ... xceled)
>
> 'lookup value for "requestedby"
> RequestedBy = DLookup("[LastName]", "Overseer", "[OverseerID]='" &
> Forms!OrdersWDetails!RequestedBy & "'")
>
> Thanks in advance!
> lmv
>
> '--------FIND CODE---------
> Private Sub FindRecordLike(strFindMode As String)
> 'Copyright 2003 J Street Technology, Inc.
> 'www.JStreetTech.com
> 'May be used and distributed without permission if these 3 lines are
> included. On Error GoTo Error_Handler
>
> 'PO number shows up in search additional fields show up as ID
> numbers Call jst_FindRecord(frmCallingForm:=Me, _
> ctlFindFirst:=Me!cmdFirst, _
> ctlFindNext:=Me!cmdNext, _
> ctlSearchText:=Me!txtFind, _
> ctlSearchOption:=Me!optFind, _
> strFindMode:=strFindMode, _
> strField1:="ProjectID", _
> strField2:="PurchaseOrderNumber", _
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10461
> strField3:="RequestedBy")
>
> Exit_Procedure:
> Exit Sub
> Error_Handler:
> MsgBox Err.Number & ", " & Err.Description
> Resume Exit_Procedure
> Resume
> End Sub


I can't make much of the FindRecordLike() and (unposted)
jst_FindRecord() routines, but if your OverseerID field is a number, and
the combo box RequestedBy has a numeric ID field as its bound column,
then your DLookup should drop the quotes around the value:

RequestedBy = DLookup("[LastName]", "Overseer", _
"[OverseerID]=" & Forms!OrdersWDetails!RequestedBy)

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:13 AM
lmv's Avatar lmv
Guest
 
Posts: n/a
   
   
Re: Search/Find Record dlookup

Thank you for the response. Would you be able to tell me WHERE to place it in
the code? I am not proficient enough with VBA... I just put it at the
beginning but it doesn't work that way. Thanks

"Dirk Goldgar" wrote:

> "lmv" wrote in message
> news:58230150-E262-45D4-9276-FE4BBC463F73@microsoft.com
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10461
> > I am using the FIND code below and it works well on all but the
> > "requestedby" (which is a combo box which is viewed as a name but
> > stored as a number.) SELECT DISTINCT Overseer.OverseerID,
> > Overseer.LastName, Overseer.FirstName, Overseer.Department FROM
> > Overseer WHERE (((Overseer.LastName) Is Not Null)) ORDER BY
> > Overseer.LastName, Overseer.Department;
> >
> > I want to be able to search in this code by the name. I tried the
> > following after the first error handler. I don't know where it should
> > go (I get error 2001, previous ... xceled)
> >
> > 'lookup value for "requestedby"
> > RequestedBy = DLookup("[LastName]", "Overseer", "[OverseerID]='" &
> > Forms!OrdersWDetails!RequestedBy & "'")
> >
> > Thanks in advance!
> > lmv
> >
> > '--------FIND CODE---------
> > Private Sub FindRecordLike(strFindMode As String)
> > 'Copyright 2003 J Street Technology, Inc.
> > 'www.JStreetTech.com
> > 'May be used and distributed without permission if these 3 lines are
> > included. On Error GoTo Error_Handler
> >
> > 'PO number shows up in search additional fields show up as ID
> > numbers Call jst_FindRecord(frmCallingForm:=Me, _
> > ctlFindFirst:=Me!cmdFirst, _
> > ctlFindNext:=Me!cmdNext, _
> > ctlSearchText:=Me!txtFind, _
> > ctlSearchOption:=Me!optFind, _
> > strFindMode:=strFindMode, _
> > strField1:="ProjectID", _
> > strField2:="PurchaseOrderNumber", _
> > strField3:="RequestedBy")
> >
> > Exit_Procedure:
> > Exit Sub
> > Error_Handler:
> > MsgBox Err.Number & ", " & Err.Description
> > Resume Exit_Procedure
> > Resume
> > End Sub

>
> I can't make much of the FindRecordLike() and (unposted)
> jst_FindRecord() routines, but if your OverseerID field is a number, and
> the combo box RequestedBy has a numeric ID field as its bound column,
> then your DLookup should drop the quotes around the value:
>
> RequestedBy = DLookup("[LastName]", "Overseer", _
> "[OverseerID]=" & Forms!OrdersWDetails!RequestedBy)
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10461
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)
>
>
>

Reply With Quote
  #4 (permalink)  
Old 28-Jul-2006, 08:13 AM
Dirk Goldgar's Avatar Dirk Goldgar
Guest
 
Posts: n/a
   
   
Re: Search/Find Record dlookup

  Donate Today!  
"lmv" wrote in message
news:454E686C-DCCF-430E-A1EE-555D0831C274@microsoft.com
> Thank you for the response. Would you be able to tell me WHERE to
> place it in the code? I am not proficient enough with VBA... I just
> put it at the beginning but it doesn't work that way. Thanks
>
> "Dirk Goldgar" wrote:
>
>> "lmv" wrote in message
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10461
>> news:58230150-E262-45D4-9276-FE4BBC463F73@microsoft.com
>>> I am using the FIND code below and it works well on all but the
>>> "requestedby" (which is a combo box which is viewed as a name but
>>> stored as a number.) SELECT DISTINCT Overseer.OverseerID,
>>> Overseer.LastName, Overseer.FirstName, Overseer.Department FROM
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10461
>>> Overseer WHERE (((Overseer.LastName) Is Not Null)) ORDER BY
>>> Overseer.LastName, Overseer.Department;
>>>
>>> I want to be able to search in this code by the name. I tried the
>>> following after the first error handler. I don't know where it
>>> should go (I get error 2001, previous ... xceled)
>>>
>>> 'lookup value for "requestedby"
>>> RequestedBy = DLookup("[LastName]", "Overseer",
>>> "[OverseerID]='" & Forms!OrdersWDetails!RequestedBy & "'")
>>>
>>> Thanks in advance!
>>> lmv
>>>
>>> '--------FIND CODE---------
>>> Private Sub FindRecordLike(strFindMode As String)
>>> 'Copyright 2003 J Street Technology, Inc.
>>> 'www.JStreetTech.com
>>> 'May be used and distributed without permission if these 3 lines are
>>> included. On Error GoTo Error_Handler
>>>
>>> 'PO number shows up in search additional fields show up as
>>> ID numbers Call jst_FindRecord(frmCallingForm:=Me, _
>>> ctlFindFirst:=Me!cmdFirst, _
>>> ctlFindNext:=Me!cmdNext, _
>>> ctlSearchText:=Me!txtFind, _
>>> ctlSearchOption:=Me!optFind, _
>>> strFindMode:=strFindMode, _
>>> strField1:="ProjectID", _
>>> strField2:="PurchaseOrderNumber", _
>>> strField3:="RequestedBy")
>>>
>>> Exit_Procedure:
>>> Exit Sub
>>> Error_Handler:
>>> MsgBox Err.Number & ", " & Err.Description
>>> Resume Exit_Procedure
>>> Resume
>>> End Sub

>>
>> I can't make much of the FindRecordLike() and (unposted)
>> jst_FindRecord() routines, but if your OverseerID field is a number,
>> and the combo box RequestedBy has a numeric ID field as its bound
>> column, then your DLookup should drop the quotes around the value:
>>
>> RequestedBy = DLookup("[LastName]", "Overseer", _
>> "[OverseerID]=" & Forms!OrdersWDetails!RequestedBy)
>>


There's not enough information in what you posted to allow me to help
you. I don't know the details of your form, I don't have the definition
of the function jst_FindRecord(), and I have only the foggiest notion of
what you're trying to do. Maybe if you post a lot more information, I
or someone here will be able to help, but you must understand we don't
know your database structure, we can't see your form, and we can't guess
at your code.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
What I believe Hukam to...
Today 18:24 PM
1 Replies, 25 Views
Thought of the Moment!
Today 13:33 PM
107 Replies, 5,043 Views
Do you believe in...
Today 13:15 PM
180 Replies, 3,741 Views
BHOOTS (Ghosts) and...
Today 13:08 PM
102 Replies, 13,864 Views
What Do You Think of...
By akiva
Today 12:56 PM
27 Replies, 550 Views
How does Sikhi help you...
Today 12:44 PM
17 Replies, 569 Views
Why are There so Many...
Today 10:23 AM
70 Replies, 5,031 Views
Biography of a Scholar:...
Today 06:10 AM
1 Replies, 62 Views
Of Serpents, Pigs,...
Today 05:21 AM
37 Replies, 1,021 Views
Should SPN Keep the...
Today 03:27 AM
16 Replies, 422 Views
Map shows world's 'most...
Today 03:02 AM
15 Replies, 246 Views
Friends. A Testimony to...
Today 02:40 AM
4 Replies, 112 Views
Panjabi
Today 02:27 AM
11 Replies, 238 Views
Rozana Reports (ਪੰਜਾਬੀ...
Today 02:13 AM
301 Replies, 7,457 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Today 01:54 AM
169 Replies, 4,346 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 18:25 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.78753 seconds with 32 queries
0