Search as I type

No not really! Can I see a stripped down version of your db. Remember to make sure it's not working on that version and include some test data.
 
By the way, did you Debug > Compile? You'll find it in the menu bar on the VBA window.
 
okay I've attached a sample. I hope that is what you meant by a stripped down version. I had a bit of a struggle with the table validation rules.
 

Attachments

Where's the form and the code? I want to be able to replicate the problem you're having.
 
great! I have somehow managed to jack up the database! It tells me that I

"do not have exclusive access to the database at this time. any change I make may not be saved":banghead:
 
okay sorry I'm getting cross eyed here. I'll do it again and add the form. Hopefully this crazy dbase lets me.
 
hope this one suffices. I had to whittle it down cos it was greater than the upload limit. Thank you for all your help vbaInet. much appreciated indeed :)
 

Attachments

Ok I see what you're talking about.

The problem is anytime you apply a filter on the form it requeries the form (i.e. fetches data) which also causes the cursor to move to the beginning of the first control in the tab order. To avoid this problem you have two options:

1. Re-order the Tab Order of the Details section to make the search box the first control to receive the cursor. Then use the SelStart and SelLength methods of the textbox to move to cursor the end of the text in the Change event.

2. Pull everything into a subform and leave the search box in the main form's header section.

My preference would be 2.
 
Sorry I've been neglecting this thread and can see much progress has been made.

The way I intended the code to work is per the attached.

To open the appropriate record, double click on the appropriate row.
 

Attachments

I hate to be the bearer of bad news. Both CJ London and VbaInet are both very skilled. But it might be next to impossible to over come your field names. Here is just one example and there are many. If in labour, minimum 35% O2 given? that is an actual field name:banghead:. So many special characters it really needs to be redone before proceeding. Sorry just 2 cents.
:D I did actually notice it but I didn't want her to keep banging her head :banghead:

By the way Cindy, there's a Description property of a field which is there as the name implies.
 
My suggestion would be to rename the field for example

Oxygen Saturation (O2Sat) documented?

as say

OxygenSaturation

and put

Oxygen Saturation (O2Sat) documented?

in the caption property for the field, or my preference, in the associated label on the form.
 
hey everyone thanks for your advise. Yes the field names were a nuisance from the beginning. I'd originally intended for data to be entered directly into the table in datasheet view and people insisted on knowing what the real column names were. Well life has progressed since then and I'm nursing a gorgeous lump on my forehead from all that head banging:D

yes option2 seems like the painless option but if only I can get the subform to behave. It covers everything on the page. Guess I'll go with option1.

Manythanks vbaInet:)
 
@Cindy - did you look at the solution in the db I attached to post #53?
 
brilliant! thanks CJ London. I plan on renaming the fields however to be clear, when you say "To open the appropriate record, double click on the appropriate row"
are you referring to the records in the header section? double clicking populates the form itself?
 
Many thanks CJ London. Yes and I'm still looking at it. still figuring out what you did to making the searchbox accept more than one character
 
still figuring out what you did to making the searchbox accept more than one character
Per post #52 (vbaInet) it is not the main form being filtered, it is a subform, so the focus does not move.
 
I tried to double click the record in the header section but nothing happened...
is it supposed to populate the form?

I had a issue with the searchbox accepting only one character. I don't see that you changed any event for the searchbox. So just adding a subform/subreport fixed that?
 
ah got it! apparently I hadn't understood what vbaInet said in that post. I was thinking of subforms on the tab control.
 

Users who are viewing this thread

Back
Top Bottom