×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

On order entry change the Customer Box to a Combo box that grabs values from the database

On order entry change the Customer Box to a Combo box that grabs values from the database

On order entry change the Customer Box to a Combo box that grabs values from the database

(OP)
Hi,

I am working with the order entry screen, and I wanted to make the Customer Entry like the Type (how you type O and Order comes up)
So I change the customer field to look like this. http://i.imgur.com/S6pMKpK.png

1st question, Does it automatically grab the customers from the cicmpy database?

If it did I couldn't figure it out so I went to this screen http://i.imgur.com/0DoSFSL.png and checked allow additional input... I left the screen and went back to it but it didn't save the check mark. SO I had to add a dummy variable named ALL. I then in the flex code did

set the datasource
sql = select cmp_name from cicmpy where cmp_type = 'C'
loop through the records
customer.add(rs("cmp_name"))
next

However when I would test it twice the items wouldn't clear, and there isn't a customer.items.clear.
SO I guess the second question is how do you clear a combobox in flex?

THe third question is how do you get it to automatically select when you type like the Type does (type O and Order comes Up)?

Basically I am trying to get the customer to be an autocomplete textbox so when they type it automatically fills in the ones that are similar

Thanks

RE: On order entry change the Customer Box to a Combo box that grabs values from the database

If you want the order type to always be O, then change this with screen designer not with code. Remove the other options from the drop down list. I am not sure this is possible with code but it definitely doable with screen designer.

To clear a combobox in flex, it is a simple "comboboxname.clear". However the customer fiekd is not a combobox. Are you adding a custom field on your screen? If so what are you attempting to do with it?

In regards to the rest of your post I am confused. You must either key in the customer or search for it. Yes it comes from the cicmpy table. But you don't need to write any code or do any screen modifications to make this work - it works fine already. What exactly are you trying to accomplish here that is not already happening to your satisfaction?

Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools: www.gainfocus.biz/exceladdin.html

RE: On order entry change the Customer Box to a Combo box that grabs values from the database

(OP)
I am trying to make the customer field a combo box. The customer is used to quick books where you enter the customer name, what I want to do is populate the customer field with the customer names and when they select one it grabs the correct number from the cicmpy table

RE: On order entry change the Customer Box to a Combo box that grabs values from the database

Its been a really long time. Buy I believe I did this in progression many years ago. I think I had to use a VBA only field before the customer field.
This Field was a combobox, and on keypress it would add values to the combobox with select top x percent where cust_name starts with "keyspressed", the next letter in the name would repeat the process, we didn't want to populate with all customers as they had 30,000+. When customer was selected, the "Cus No" field that is naturally on the screen was automatically populated based on the VBA only field selection. I think we had the VBA Only field in front of the "Cus No" field. I remember it was someone that was a QuickBooks junkie and we did this on the customer number fields and item number fields.
Perhaps this may help.

RE: On order entry change the Customer Box to a Combo box that grabs values from the database

I am fairly certain you cannot make this field a combobox.

Have you shown them the search button? They do not have to key in a customer number, they look it up by name, the search displays a subset of customer data depending on what they entered in the search and they select the one they want. Is this really undesirable for some reason?

If I had to so this, I would create a user form that displays on the customer number got focus event. On this user form have an entry field and a grid. Have the grid display the customers with a SQL statement, which changes every time they key in a letter. Then give them the ability to select from that list and return the proper value back to the OE0101 screen. However I am sure this would be slower than the built in search.

Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools: www.gainfocus.biz/exceladdin.html

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close