Search Form help (1 Viewer)

colenzo

Registered User.
Local time
Today, 10:43
Joined
Jun 2, 2010
Messages
42
Hi all,

Having looked through the forums and searched for something to help (to much avail) I thought i would ask the question.

Im a complete beginner at access, and whilst have managed to figure some things out, have completely stumped myself when it comes to setting up the required vba code for my search form.

What i require, is a form based search method (similar to something like the allenbrowne one available on the net) where I can use say, two unbound boxes to search basically two fields to find the correct record.

The fields I wish to search are CLIENT and ENTERDAT in the table BACKUPQUERY_TBL.

Client is a three letter field thats text only, whilst date is a short date field (no time involved)

What, for the life of me, I cannot work out, is how i can search by either one, or both combined, display the results within the form (so having the unbound boxes in the header and results in the detail perhaps?), and have the ability to double click on a record and pop-up into a editable form where I can enter in information for two additional fields.

My main form is called SEARCH and the popup editable form is called QUERIES.

Can anyone help me on this please? I have little to no idea where to go with the coding, and am not so quietly flailing around in the dark now!

FYI im using access 2000 - have no help file and cannot launch any wizards (IT sucks in my company)

Thanks for any advice! :D
 

colenzo

Registered User.
Local time
Today, 10:43
Joined
Jun 2, 2010
Messages
42
Thanks, I'll check that out today! Looks promising, and with some good explainations. Hadn't gotten back as far as 2005! It's frustrating this trying to learn on your own lark!

Thanks for the help so far!
 

colenzo

Registered User.
Local time
Today, 10:43
Joined
Jun 2, 2010
Messages
42
Great form, and great help from the search point of view. The one thing I'm missing is the ability to double click the record, and open up another new for (like in the example), but to be able to edit the details or add bits in to this form. It seems in the example that it is used only as a reference.
Unfortunately, its a must to be able to edit the record at this point, as details would have to be entered in my query field.

So.. can you point me in the right direction again please? Many thanks!
 

colenzo

Registered User.
Local time
Today, 10:43
Joined
Jun 2, 2010
Messages
42
Great form, and great help from the search point of view. The one thing I'm missing is the ability to double click the record, and open up another new for (like in the example), but to be able to edit the details or add bits in to this form. It seems in the example that it is used only as a reference.
Unfortunately, its a must to be able to edit the record at this point, as details would have to be entered in my query field.

So.. can you point me in the right direction again please? Many thanks!

Ok, i've fixed the previous problem, however, when use the pop up form from the list box, its not matching the record I select, and i'm getting an enter parameter box and nothingness.

Code:
Private Sub SearchResults_DblClick(Cancel As Integer)
    
    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "FRM_Query"
    
    stLinkCriteria = "[RCID]=" & Me![SearchResults]
    DoCmd.OpenForm stDocName, , , stLinkCriteria
    
End Sub

I personally and because im a beginner, cannot see anything wrong with this.. can someone point out where i'm going wrong?
 

colenzo

Registered User.
Local time
Today, 10:43
Joined
Jun 2, 2010
Messages
42
Please ignore me.. I didnt change the bound column! what an idiot! oh well.. live and learn!
 

John Big Booty

AWF VIP
Local time
Today, 19:43
Joined
Aug 29, 2005
Messages
8,263
Wow, you've been busy, and it looks as if you got it sorted.

Glad the DB was of some assistance :)
 

colenzo

Registered User.
Local time
Today, 10:43
Joined
Jun 2, 2010
Messages
42
Alas, I have hit a hurdle once more.

The search results box (list box).. is there anyway of being able to sort this. Ideally I would like it sorted by the RCID field, descending. This way, the most recent record is at the top of the box when filtered!

Again, any help to point me in the right direction, otherwise i'll stumble around for a bit!

Thanks, this place has been a great help so far!
 

RodneyzPc

New member
Local time
Today, 05:43
Joined
Mar 28, 2024
Messages
2
Hi,
On the DB with FRM_SearchMulti...I don't have the option of On Change event for the list box. Everything was going good till then. :) I'm using Access 2000..only thing I can afford
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:43
Joined
Oct 29, 2018
Messages
21,505
Hi. This thread is a few years old. You might consider starting a new one. Just a thought...
 

June7

AWF VIP
Local time
Today, 01:43
Joined
Mar 9, 2014
Messages
5,490
Do have option of AfterUpdate event. Be aware if you cursor through listbox, each movement will trigger event.
 

Users who are viewing this thread

Top Bottom