By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

Find Correct Record with multiple key

P: 34
I have a problem as follows:I have a form, with fields to edit. The data is keyed on a 'text identifier', which is entered and then used. I then determine if there are multiple occurrences of the that key (it's annoying, but possible).The single occurrence of the 'text identifier' is no problem - at the moment. If there are multiple occurrences, I use a combo to select which date the user wants. I then try and select the correct record using 'text identifier' + Date.

This is where I am having trouble. I have tried 'filtering' and 'find record', but get various issues with null data being returned.

I'm sure there must be a simple efficient way of achieving this.

Many thanks in advance.
Dec 30 '08 #1
Share this Question
Share on Google+
7 Replies


nico5038
Expert 2.5K+
P: 3,072
I would change the textfield into a combobox and use cascading combo's (Check: http://bytes.com/topic/access/insigh...mbo-list-boxes)
You could check after the first field has been selected or there's no data for the second combo and proceed directly.

Nic;o)
Dec 30 '08 #2

P: 34
Thanks for that. The reason why I used a textbox and not a combo for the first key was that there will be thousands of records to choose from initially.

But, if that's the only/best way, then I'll have ago.

Thanks again.
Dec 30 '08 #3

nico5038
Expert 2.5K+
P: 3,072
The advantage of the combo box is the "auto append" feature. When typing a code Access will append the first matching number. Just give it a try :-)

Nic;o)
Dec 30 '08 #4

P: 34
Have tried your approach, and linking the combos is fine (this wasn't a problem anyway). Once I select the date (on the second combo), I still get 'null' data coming through, as it doesn't appear to be able to fix onto a record with the 'identifier' plus 'date' put together as a search key. Again I've tried (in 'date_combo' afterupdate) to use filter, or similar.
Jan 5 '09 #5

nico5038
Expert 2.5K+
P: 3,072
How does your filter gets constructed ?
Be sure that the date needs to be embedded in #'s and strings (when your code is a text field) in single quotes.

Nic;o)
Jan 5 '09 #6

P: 34
Thanks Nic.

Problem solved.

I'd assumed that the date returned in the combo didn't need to have "#" surrounding it - but it did!

Many thanks again.
Jan 6 '09 #7

nico5038
Expert 2.5K+
P: 3,072
No thanks needed, glad I could help and success with your application !

Nic;o)
Jan 6 '09 #8

Post your reply

Sign in to post your reply or Sign up for a free account.