Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 16th, 2005, 04:48 PM
theguz theguz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 54 theguz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 40 m 34 sec
Reputation Power: 4
Unhappy Help with DoCmd.OpenForm

I am trying to open a form that only shows the record designated by the user. I have a list of field names they can choose from and they put in data for the "Where" part. However the compiler is saying "Run-Time Error 2465:
Access cannot find the field "|" refered to in your expression."

I get my data for the record from a query. Here is my code. I am new and barely know what I am doing so please tell me where i went wrong. Thanks
Dim strField As String 'Vari. for input from listbox
Dim strText As String 'Vari. for input from textbox

strField = Form_frmMORE!listFields.Value 'Acquiring values from form
strText = Form_frmMORE!txtData 'Acquiring values from form

DoCmd.OpenQuery "qryResults2"
DoCmd.Close acQuery, "qryResults2"

DoCmd.OpenForm "frmResults", acNormal, , [ strField Like '" & strText & "'] 'Here is where the Error is

Reply With Quote
  #2  
Old June 17th, 2005, 11:24 AM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 4
Is this a new question or was it answered in your other post?

Reply With Quote
  #3  
Old June 17th, 2005, 11:33 AM
theguz theguz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 54 theguz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 40 m 34 sec
Reputation Power: 4
No need to answer this one, the post you supplied was perfect.
Thanks,

theguz

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Help with DoCmd.OpenForm


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway