Solved

Finding a record using criteria for bound controls

Posted on 2003-11-13
3
181 Views
Last Modified: 2010-05-03
I am trying to add an extra textbox/combo to help me insert search criteria so that users can go to a particular record without having to resort to the use of findnext and findprevious only.
I tried to do it like this:

Private Sub FindSICode_AfterUpdate()
    DoCmd.FindRecord Me.FindSICode
End Sub
This keeps on giving me the error 'Ther command or action "FindRecord" isnt available now'
This can easily be implemented when u r dealing with unbound controls but I would like to find out if its possible to do it with bound controls.Thanx a lot
0
Comment
Question by:briokas
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
_agj_ earned 50 total points
ID: 9739532
cant u do it like

datacontrol.datasource = "select * from table1 where field1='" & text1.text &"'"
0
 
LVL 7

Expert Comment

by:_agj_
ID: 9739537
mebbe u mite need to do a datacontrol.refresh or requery also.

also, text1 would be the place where u enter ur search criteria for field1
0
 

Author Comment

by:briokas
ID: 9753770
Tried that method it didnt help me I guess the only alternative is to use unbound controls
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now