a few nagging problems

Gazza2

Registered User.
Local time
Today, 04:19
Joined
Nov 25, 2004
Messages
184
firstly sorry for the long post but hopefully i can get these annoying problems sorted on here.

I have a search form that i use to search the customers table and display the matching names in a list box. The listbox is based on a query with a sequence field.

Problem 1
When a user enters part of the accountcode and presses enter the listbox displays the matching criteria(works) but the sequence is all off.What i want to know is is there anyway for the sequence to only apply after the query has sorted the results.

Problem 2
The reason for the sequence is after the enter key is pressed in the first text box the cursor goes to another text box and a user enters the number matching the customer name that they want then it opens up another form with the customer name displayed in appropriate box which in turn autofills the other details.

Problem 3
On the second form i have an orders subform which all works ok except the total field on all lines changes to the same as the total on the current line.does anybody know what i have done wrong.

I have attached a copy of my db so you can see any details that you need.

Thanks in advance and sorry for the overload
 

Attachments

Gazza, have a look at the attached.

I think I've sorted those out for you.
Essentially, to solve problem 1 I had to do three things.
One, use a parameter query of your table that limits the data to like * whatever is in your txtsearch *
Two, I re-jigged your original query to use the new query as a source instead of the table directly.
Three I re-wrote your Sequence field to actually provide a running count of lines instead of just a total count of lines.


To solve problem two I changed the after update code to open your form where the Accountcode = whatever by using Dlookup to look up the relevant accountcode from the same query that is the source for your listbox.

To solve problem three I bound the total control to a formula. In continuous form view, an unbound control acts as only one control seen many times, whereas a bound control acts as if it is different on each line of the form.

I have also set it so that the listbox gets updated with each keystroke rather than waiting for the update event.

Good luck with your project. :)
 

Attachments

more than expected

Thanks very much CraigDolphin

All works a treat and the work you've done is much more than expected.I'm off now to learn what you have done.

Thanks again.
 
Happy to help. If you have any questions about it feel free to ask. :)
 

Users who are viewing this thread

Back
Top Bottom