Hi,
I'm new to the group...
Can MS be programmed to present a list of words for the user to choose from? A cursory search of the online manual shows me possibly.. with the Dialog ListBox option?
TIA
Chris
Can MS choose from list of words?
Moderators: Dorian (MJT support), JRL
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Hi, Bob.bob hansen wrote:I will bet the answer is YES, but can you be more explicit with an example of what you are trying to do?
I'd like to use MS to automate data entry in a 3rd party app. In a certain dialog of the app, some data _may be_ the same as the previous record. Would be nice to avoid typing that data again.
--
chris
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Will give it some thougt......
Depending on the application you are using, it may be possible for you to create some VB script to read certain fileds in the last record and copy them to the current record.
Much more than I could spend time on here.
It would also depend on the 3rd party application....what program/database/language are you working with?
Oops, I just remembered that there was a sample ODBC script on the MacroScheduler sample script sections under the VB section. I don't have the exact link at this time, but I think I have a copy.....wait one.... YES!..... The sample script is here, uses Northwind database from Access:
=====================================
Note this sample just shows how to create an ODBC connections and access the records. It does not address your specific problem.
Hope this helps.........good luck,
Bob
Depending on the application you are using, it may be possible for you to create some VB script to read certain fileds in the last record and copy them to the current record.
Much more than I could spend time on here.
It would also depend on the 3rd party application....what program/database/language are you working with?
Oops, I just remembered that there was a sample ODBC script on the MacroScheduler sample script sections under the VB section. I don't have the exact link at this time, but I think I have a copy.....wait one.... YES!..... The sample script is here, uses Northwind database from Access:
=====================================
=======================================
VBSTART
Function GetCustomerName(CustID)
Dim SQLString
set MyDB = CreateObject("ADODB.Connection")
MyDB.Open "Northwind"
SQLString = "select * from Customers where CustomerID = '" & CustID & "'"
set rsCustomers = MyDB.Execute(SQLString)
If Not rsCustomers.EOF then
GetCustomerName = rsCustomers.Fields("CompanyName")
Else
GetCustomerName = "Not Found"
End if
MyDB.Close
End Function
Sub ChangeName(CustID,NewName)
Dim SQLString
set MyDB = CreateObject("ADODB.Connection")
MyDB.Open "Northwind"
SQLString = "Update Customers Set CompanyName = '" & NewName & "' Where (CustomerID = '" & CustID & "')"
set rsCustomers = MyDB.Execute(SQLString)
MyDB.Close
End Sub
VBEND
Input>CustID,Enter Customer ID:
VBEval>GetCustomerName("%CustID%"),CustName
MessageModal>The Customer Name Is : %CRLF% %CRLF% %CustName%
Input>NewName,Enter New Name:,CustName
VBRun>ChangeName,%CustID%,%NewName%
Note this sample just shows how to create an ODBC connections and access the records. It does not address your specific problem.
Hope this helps.........good luck,
Bob
> ...a sample ODBC script on the MacroScheduler sample script sections...
Hi again. I appreciate all your help, Bob. Thanks.
Keep in mind... I have not used MS, yet, but would like to know if this solution is available -- before taking the plunge.
Isn't there a simpler solution, maybe something built-in to MS? How about it's Dialog command? I see there's a ListBox option. Can items be added to the ListBox easily, like as I'm running the macro & entering data?
--
chris
Hi again. I appreciate all your help, Bob. Thanks.
Keep in mind... I have not used MS, yet, but would like to know if this solution is available -- before taking the plunge.
Isn't there a simpler solution, maybe something built-in to MS? How about it's Dialog command? I see there's a ListBox option. Can items be added to the ListBox easily, like as I'm running the macro & entering data?
--
chris
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
It is possible to populate the ListBox in the Dialogs. But they are usually filled before the dialog is called in the script. They can be filled with variables.
It may be poossible to modify the listbox contents on the fly, but I don't think so. Perhaps someone else will say Yes?
How about some free thinking for a few moments... how does this sound?
1. Enter data into a field
2. Hit a hot key to save the field contents and write it to a file
3. Repeat for fields in the record, pressing hot key on each field to be saved.
4. Save record and open new record
5A. Hit a hot key and populate all the fields that were saved earlier
OR
5B. Be prompted on individual fields about entering from previous record.
OR
5C. Select a group of fields to be entered automatically, and manually enter the rest.
A few more questions, less critical, just trying to get a better understanding of the environment.........
Will you always be selecting the same fields to copy?
Will the fields always be in same positions?
Are keyboard commands available vs. mouse commands to navigate through the fields in the record? To progress through records?
It may be poossible to modify the listbox contents on the fly, but I don't think so. Perhaps someone else will say Yes?
How about some free thinking for a few moments... how does this sound?
1. Enter data into a field
2. Hit a hot key to save the field contents and write it to a file
3. Repeat for fields in the record, pressing hot key on each field to be saved.
4. Save record and open new record
5A. Hit a hot key and populate all the fields that were saved earlier
OR
5B. Be prompted on individual fields about entering from previous record.
OR
5C. Select a group of fields to be entered automatically, and manually enter the rest.
A few more questions, less critical, just trying to get a better understanding of the environment.........
Will you always be selecting the same fields to copy?
Will the fields always be in same positions?
Are keyboard commands available vs. mouse commands to navigate through the fields in the record? To progress through records?
> Will you always be selecting the same fields to copy?
Possibly. My current concern is a 'text' field that contains multiple descriptions about the record. Each description separated by a comma.
>Will the fields always be in same positions?
Relative to it's window -- yes.
> Are keyboard commands available vs. mouse commands to navigate through the fields in the record? To progress through records?
Yes. 'Tab' moves between fields; Arr-Up/Dn to prev/next record.
Here's a PDL of what I'd like MS to do:
1. Enter any amount of descriptions from a ListBox into a field, each separated by a comma.
2. Update the ListBox, including any new descriptions from the field.
Now the list is ready for use in the next record.
Possibly. My current concern is a 'text' field that contains multiple descriptions about the record. Each description separated by a comma.
>Will the fields always be in same positions?
Relative to it's window -- yes.
> Are keyboard commands available vs. mouse commands to navigate through the fields in the record? To progress through records?
Yes. 'Tab' moves between fields; Arr-Up/Dn to prev/next record.
Here's a PDL of what I'd like MS to do:
1. Enter any amount of descriptions from a ListBox into a field, each separated by a comma.
2. Update the ListBox, including any new descriptions from the field.
Now the list is ready for use in the next record.