Help ! Validation of text boxes.

Thanks ! will wait patiently for your reply. in the meanwhile i'll try to solve some of the errors i found.

the form doesnt really need to be fancy. i've seen some search forms here which are quite advance but i have of little knowledge of how to apply them.
 
hey cyberlynx i've started off with my search form already.


but i still could not solve an old problem.


Quote:
First off.....

Quote:
i'll try to make dollar connected to product and the transaction too.
The code I provided already takes care of that.


Well actually it takes care of the product only. i'm trying to play around so that it would actually work for the others too.

like for example. if i do enter something in the transaction two, dollar two and customer 2 box and leave the product two box empty. i am able to submit they data.


what i want is that even if i enter something in transaction two or dollar two or customer two and leave the product two box empty, it would prompt me to enter in the data for all of the related boxes before i can proceed.

Will running your code 3 times with the edited textbox solve it ?



attached below is my database. jus touch the insert form would do. the search form is kinda messy as i haven edited it. thanks.
 

Attachments

Sorry for the delay...I have been quite busy.

Off hand...real quick...Here is how I would just start it (see attached) at least for your particular application:

.
 

Attachments

omg the dashboard is a great idea ! i think i need some time to go throught what u jus did. thank you so much !
 
Your welcome. I Hope it helps somewhat. You'll notice that the Search Form and the Queries Entry Form (as you call it) are actually one Form. It's all a matter of displaying what and when.

.
 
hey cyberlynx your modified database was quite something but i couldnt digest everything. somehow somethings were still buggy over there but nevertheless thanks a lot for the time u spent ! it gave me quite a number of ideas.


well i re-did my database. but i still could not solve the product 2 problem. i tried using the function from your new database but it couldnt work.

even thought it blanked out the fields and only allowed people to insert them 1 by 1.

after i insert the product two, it takes me to the customer two. after i insert the value of customer 2 in, and i press submit it still submits the data into the table.


do u have like any ways to make a same restriction like u did for the product 1,2 and 3 textboxes. for all the customer IC 2, dollar amount 2, transaction date 2, customer IC 3, dollar amount 3, transaction date 3 textboxes ?

for example when i insert a value into product 2 and press submit a prompt box would tell me that customer IC 2, dollar amount 2 and transaction date 2 has to be filled in.

then when i go on to enter the value in customer IC 2. after when i click submit, it will prompt me to enter values into dollar amount 2 and transaction date 2.



thanks.




attached is my database. thanks again !
 

Attachments

Last edited:
Hmmm. I don't seem to have the problem you are experiencing. When I enter the value for Customer IC 2 and attempt to move focus off that control (to say, select the Submit button) a check is done on the remaining product data (dollar amount and transaction date). if they are empty for that product item then the user is prompted for the data and is basically forced to enter it. You can basically do nothing else until the data is entered.

Do you experience this problem within the Returned Sample DB I posted? Or is it a problem after you have implemented the changes into you own master DB?

.
 
erm i tried implementing it into the database that i attached above. it did darken out the textboxes but did not check it. the one i attached above is a new version. it does not have what i tried to do with your code.

i cant seem to find the reason y it doesnt check the textboxes.

what i did was i added in the checkproducts function and made them all afterupdates. and it still wont work in my database. why is that so ?

could u help me test it out ?
 
As I mentioned, the Sample I returned to you in my previous post was based from a sample you had posted even earlier yet. I made the changes to the Sample DB an returned it. To me...the sample I returned appears to work fine unless there is something I missed. If it is working fine then I suggest you carefully look over what was done to accomplish the task at hand and implement it into your project DB if you like. If it works in one.....it should work in the other. What have you missed?

You can post a new sample DB every day and I can modify it till I'm blue in the fingers but if what is working is not implemented within your main project then we can go like this forever and then he bottom line becomes.......who is building this Database.

I don't mean to come across as crass but as I said....this can go on for a long time. It would be better for you to just E-Mail the project to me and I can implement the necessary code into the main project or a module thereof. and then this particular situation is solved once and for all.

.
 
Haha..this has been going on so long my friend that I forgot exactly what I did to this DB Sample. :)

In any case....here is your DB back to you modified.

Uhhh...Yes. Good thing I wrote Txt file of what I did :D


THE UPDATE FORM


- Changed the Reference to Microsoft Outlook 11 Object Library to Microsoft Outlook 10 Object Library because I do not have 11. You can change this back to 11.

- Removed all the Recorset requests from the 'lanid_AfterUpdate' event and used one recordset instead. This way it can be closed and cleared from memory properly.

- Added 'Option Explicit' to the Declarations section of the Update Form so as to ensure Variables and Objects are properly declared.

- Added a Multi-Dimensional Array (CtrlArray) to the Declarations section of the Form's code module.

- Added code to the 'lanid_AfterUpdate' event to fill the above Array when a Lan ID is selected. This is so that the contents of the controls can be compared in order to see if a change was made.

- Removed the Min/Max and Close buttons from the Form. This forces the Form to be closed by the Close Button located on the Form and allows us to control the CLOSE better.

- Added the 'IsSaved' Boolean Variable to the Declarations section of the Update Form so as to determine if the 'Update' button was selected. This variable is set to True when the 'Update' button is selected and set to False when a new Lan ID is selected.

- Changed the code within the 'Clear Form' command button's OnClick event. Placed in a For/Next loop to enumerate through Form controls and set them to Null rather then listing each control on Form and setting the value to those controls to Empty String. More effeiciant with a For/Next Loop.

- Indented code within the Update Form's code module. This makes code MUCH easier to read and work with. This would be a real good habbit to get into.

- Added code within the OnClick event for the 'Goto Insert Form' button to check and see if data was modified.

- Added code within the OnClick event for the 'Goto Search Form' button to check and see if data was modified.

- Removed all the Calendar controls on Form and replaced with a Form Style Calendar. The Calendar Control is troublesome at the best of time and it gobbles resourses. It also requires stringent References to the Control should he Database move from on Computer to another. It s best to avoid the Microsoft Calendar Control (in my opinion). A Database Code Module was added to accommodate the new Calendar. A different Calendar Image was also used. ALSO, I removed the Code in Form pertaining to the Old Calendar controls. You will notice that not near as much code is required in Form.

- Added a Dynmaic INSERT query to the OnClick event of the 'Update' button so as to log the data changes to Form Controls into the AuditLog Table.

- Created a 'AuditLog' Form so that you can easily view the Audit. This Form obviously shows when a Record is Created but it also shows a list of Fields that have been updated from the 'Update Form'. Update some records then open the AuditLog Form. Navigate to the last records in the set and you will see which fields were modified, the original field data value and the new data value saved. I believe tis is what you were looking for :)

==================================================================================


DATE OF EXPIRY



- Created a Startup Tmer Form which is hidden from view. This Form contains an active timer which will cycle every 30 minutes at which point the Table is checked for Expired Queries. If any are found then the User is notified via Message Box of the number of Expired Queries.

- Added an additional Text Box and Label to the 'Update Form' which indicates the number of days remaining before the currently visible Query is expired. If the Query is Resolved then nothing is displayed. The TextBox which displays the Number Of Days Remaining also contains Conditional Formating. If the number of Days Remaining is 8 and above days then the Text is black on white background. If the Days Remaining is between 2 and 8 Das (3 to 7) then the Text is White on a Blue Background. If the Days Remaining is 2 days or less then the text color is Yellow on a Red background. Looking at this Form and the code therein (within the OnClick event for the 'Update' button) you should be able to implement or change things the way you want or apply it to other Forms.


That should keep you busy.

.
 

Attachments

Users who are viewing this thread

Back
Top Bottom