Form creating incomplete entries

evega6686

Registered User.
Local time
Yesterday, 16:54
Joined
Jun 2, 2015
Messages
50
I have a form that when the end user is searching for previous records it creates an erroneous record based off of the search criteria. I want it to create a record ONLY when the "Enter" button is pressed.

Is there a way to limit the form to creating records only when ENTER is clicked on?
 
You were already advised in this post that your form should not be bound and I specifically mentioned that I had made the search controls unbound.
 
With the unbound controls not all of the data is being saved. I assumed that it was. I have some queries in between the click of the button and the actual saving of the record. To be specific (SQL Attached):
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenQuery "UpdateMasterCreativeID"
DoCmd.OpenQuery "AppendMasterCreativeID"
DoCmd.SetWarnings False
DoCmd.OpenQuery "DeleteQ"
DoCmd.Close acQuery, "UpdateMasterCreativeID"
DoCmd.SetWarnings True
Me.Requery
 

Attachments

...also...

I want to make a continuous form for adding multiple records at once. Would you be able to direct me in performing this correctly? Any assistance is greatly appreciated.
 
Basically bound controls should not be used as search controls. Search controls are meant to be unbound, and in most cases placed in the Header section of the form.

As for continuous forms, the search controls will need to be placed in the Header section of the form. If you use the Continuous Forms wizard it will do it for you.
 
The form actually serveds 2 puproses 1) Search table for records based on the selection made in the 3 drop-down lists, and 2) [main function] Create records based off the data selected in the 3 drop-down lists.

I can not find the Continuous Form Wizard, I think it is because I am using Access 2003(?)
 
The form actually serveds 2 puproses 1) Search table for records based on the selection made in the 3 drop-down lists, and 2) [main function] Create records based off the data selected in the 3 drop-down lists.
You've already been advised on several occasions the purpose of a search control and whether it should be bound or not. It's up to you to accept it and start working on a re-design of your form or not accept it and continue having errant records getting saved. I'm not going to repeat this.

It's been a while I saw Access 2003 so I don't remember at which point the wizard appears. I think it's the normal Form Wizard and in one of the steps it asks what sort of view you would like it to be.
 
..
I can not find the Continuous Form Wizard, I think it is because I am using Access 2003(?)
It is called Tabular. You're asked which layout you want when you use the wizard.
 
I will have to accept it and start working on a redesign of my form. I changed all the controls to Unbound, where do I go from here?
 
Good! All the controls don't need to be unbound, just the search controls. Let's see a screenshot of your form and I can advise.
 
Here ya go...
 

Attachments

  • CID_SS_061815.jpg
    CID_SS_061815.jpg
    95.5 KB · Views: 126
Because your search form is crammed, the only option you have is to open another form that can be used for data entry. Search controls and data entry controls don't mix.

So create a duplicate of your form, remove all the irrelevant controls, i.e. reports frame, search button etc, and bind that to the original Record Source.
 
Is there a way to force the entries to be a specific length? I'm thinking that if I can require that the CID be 11 digits (bytes/characters - no less, no more) then I can avoid having incomplete entries.

Is there a way to enforce a character length?
 
There are a couple of ways:

1. Perform a length check in the Before Update event of the control using the Len() function, and if it fails the length test, set the Cancel parameter of the event to False
2. Use an Input Mask
 
I would like to go simple and use the input mask. It's been a while since I used one, for text how would I enter it in the table properties (i.e.: should I list out 00000000000, or use another character for text?)

Is there a way to have the input mask be zero or 11 characters? but nothing in between?
 
Is Null OR Like "###########"

Would this work in my validation rule?
 
I don't remember the masks in input masks neither do I use them because they're limited. You'll need to Google that. I don't think that's possible anyway using input masks.
 
Again, I don't use Validation Rule, it's limited and for beginners. Any validation you want to do can be done in code where you get the options are endless.
 

Users who are viewing this thread

Back
Top Bottom