PDA

View Full Version : Missing Last Copy



jbbman
08-04-2010, 12:38 PM
I have a form in Word 2003 that I'm trying to automate. The form is sent to patrons via email to let them know their reserve book/CD/DVD is lost or stolen; and therefore, they wont be getting the book or other item.

I have two textboxes with the patron's name and card number. What I want is to type in their information on the form and have it saved in an excel file or database. Once that patron is in the database, I want to be able to retrieve their name or card number from the database without having to look them up in our circulation catalogue. In other words, I want the textboxes linked to the databases, much like Google remembers your last search. Is it possible? Thanks. :think:

JBBman

Tinbendr
08-04-2010, 01:41 PM
Sure that's doable.

Can you provide a sample document?

How many records?

How do you want the form to recall the data? Type in last name and pick from listbox? By customer number? Do you want ALL the records in a combo or listbox.

jbbman
08-05-2010, 11:27 AM
I've provided the form image in Word 2003 as an attachment called Last Copy.doc. I want to select the names and card numbers of the patrons I type in in a little excel 2003 file or database. Next time I put in that particular patron or their number in the proper textbox, the form would autocomplete the name or number.:yes

Tinbendr
08-07-2010, 05:27 AM
Crude but appears to be working.

jbbman
08-07-2010, 08:37 AM
Thanks for all your time and help.

I tried the files you sent to me, but I keep getting a error 1004 every time I try to save names. The error looks like this:

D:user\Jim\AppData\Local\Temp\PK43F8.TMP\Patron_Data.xls
caused a problem.
'D:user\jim\appdata\Local\Temp\PK43F8.TMP\Patron_Data.xls'
could not be found. Check the spelling of the file name, and verify that the file location is correct.

If you are trying to open the file from your list of most recently used files
on the file menu, make sure the file has not been renamed, moved or deleted.

I finally fixed that problem by putting both files in the same directory. However, when I put a name in the box like Barack Obama it doesn't go to the end of the database or file. The list becomes sorted by first names. Also, how did you put in the non numeric characters in the patron number box, it was meant for numbers only (very interested).

Tinbendr
08-07-2010, 03:13 PM
I finally fixed that problem by putting both files in the same directory.
Yes. The way it is coded, you have to have both files in the same directory.


However, when I put a name in the box like Barack Obama it doesn't go to the end of the database or file. The list becomes sorted by first names.

Yes, again by design. If you don't want it sorted, comment out the line
.Range("A2:B" & xRow + 2).Sort _
Key1:=.Range("A2"), Key2:=.Range("B2")

Also, how did you put in the non numeric characters in the patron number box, it was meant for numbers only (very interested). I dropped the names into the Excel file from a list off the internet so I'd have something to work with. I didn't key them in.

jbbman
08-07-2010, 03:55 PM
Tinbender Thanks.

Problem Solved.