PDA

View Full Version : Solved: User Form Control issue



MRichmond
08-25-2011, 11:43 AM
Hi to all viewers.

I am looking for some help creating a user form, or more precisely making it work how I want.

I have a user form, where people are required to enter data needed to resolve customer service issues.

They should be able to enter a new record, or edit an existing record. They would be able to scroll through all records (I have this working, thx XLD), or search for a record using a unique log number.

So I am looking for the appropriate code to start my form blank, and then switch to view/edit existing record, when one of the lower command buttons are activated. I think I can figure out the Add New, Save and Cancel portions, once this little bit has been solved.

I am attaching a test workbook, and as always any and all help is really apprieciated.

Bob Phillips
08-25-2011, 11:50 AM
I am not sure I understand what you want. The form already has a nice first/prev/next/last set of buttons, you pre-load the first record, and presumably the save works.

DO you want some more code to clear the form, and save the details if changed?

MRichmond
08-25-2011, 11:56 AM
Hi XLD,

thats more or less exactly what I'm after.

I was initially thinking of the form starting blank, but clearing it if you want to add new would work just as well.

PS it's your code for the scrolling and yes it does work nice :yes

Bob Phillips
08-25-2011, 01:35 PM
I was commenting on the design and general usage of the form, not the code, but thanks anyway :)

Okay, give this a whirl. Not fully tested, I'll leave that to you.

A couple of comments. I have always found that rather than words on the scrolling buttons, if you get some images as you do on a player, the forward, last type arrow buttons, that creates a better effect. Also, rather than that message when they hit the X, close it down for them using CloseForm_Click. I have done it in the code.

MRichmond
08-25-2011, 02:28 PM
Thanks XLD, I can only see one thing wrong, when you add a new record it overtypes the last line.

Ill see if I can fix it myself, but I may need to come back to you.

Thanks again

Bob Phillips
08-25-2011, 03:58 PM
OK.

I think it needs some validation as well on a record, there must be some mandatory data, and dates should be checked as dates etc.