Solved No data entry after a certain time ? (1 Viewer)

bob fitz

AWF VIP
Local time
Today, 13:10
Joined
May 23, 2011
Messages
3,836
If you have a relationship, and your form/subform was created by the Wizard, moving to the subform, will not Automatically save the New record of the Parent form.
:unsure: I have never experienced that behaviour with a form bound to a table/query.
I should be interested to see an example if you have one.
 

bob fitz

AWF VIP
Local time
Today, 13:10
Joined
May 23, 2011
Messages
3,836
....... I always found that if i didn't include a save button, people would always ask for one. ........
If you feel it would be more aesthetically pleasing to your users you could leave the validation code in the form's BeforeUpdate event and have a button labeled "Save" which could be coded to move to a new record which I assume would be the next thing they would want to do and that record movement would cause Access to save the record and fire the validation code.

In the form's AfterUpdate event you could also have some validation code to inform the user if the child table/subform doesn't have least one record. I can't imagine many scenarios where you would want to create an order without anything being ordered.
 

Emma35

Registered User.
Local time
Today, 05:10
Joined
Sep 18, 2012
Messages
297
Sorry guys i've been under the weather a little for the last couple of days so haven';t checked the thread.
Thanks arnelgp. I had a look at your example but it still gives me the 'Booking confirmed' message before i even make a selection on the subform ?

bob...i know Save buttons are not necessary really but i've always found that with people who are not familiar with Access, it's nice to provide them with something which clears the record off the screen for the next User. The last database i created, i didn't include save buttons and got nothing but complaints about previous users leaving the form on the screen full of text. It's all a matter of personal choice i suppose.
 

bob fitz

AWF VIP
Local time
Today, 13:10
Joined
May 23, 2011
Messages
3,836
Emma
Try commenting out the code that arnelgp has in the Orders forms Before Update event .

EDIT
Glad to hear that you're feeling better, or perhaps you were just missing us ;):);)
 
Last edited:

arnelgp

error reading drive A:
Local time
Today, 20:10
Joined
May 7, 2009
Messages
9,580
is the subform function separate from the main form?
it does the same validation as the main form, no entry after 10 am.

listen to the old man :p
 

Emma35

Registered User.
Local time
Today, 05:10
Joined
Sep 18, 2012
Messages
297
Ok i took the code off of the parent form and just used the subform code. It's working better now but when i try to select more than one item from the subform menu, the 'Booking Confirmed' message keeps popping up after every choice i make. Sorry if i've done something silly !

bob......of course i missed you all ;). You guys have dug me out of more holes than i care to remember (y)
 

Attachments

bob fitz

AWF VIP
Local time
Today, 13:10
Joined
May 23, 2011
Messages
3,836
Ok i took the code off of the parent form and just used the subform code. It's working better now but when i try to select more than one item from the subform menu, the 'Booking Confirmed' message keeps popping up after every choice i make. Sorry if i've done something silly !

bob......of course i missed you all ;). You guys have dug me out of more holes than i care to remember (y)
Is the confirmation message really required and if so, when. Just after the first items or just when the order is completed
 

Emma35

Registered User.
Local time
Today, 05:10
Joined
Sep 18, 2012
Messages
297
They both actually work well. Last thing (i know women are never happy)......if the booking is cancelled can i prevent the record from being saved in tbl_Orders. I could probably work around it but is there a line of code which would achieve the same result ?
 

bob fitz

AWF VIP
Local time
Today, 13:10
Joined
May 23, 2011
Messages
3,836
They both actually work well. Last thing (i know women are never happy)......if the booking is cancelled can i prevent the record from being saved in tbl_Orders. I could probably work around it but is there a line of code which would achieve the same result ?
Once you move the focus to the sub form the main form record is saved by Access. You could delete the record though, or perhaps better would be to add "cancelled" field to the orders table.

BTW My wife is always happy but then she would be. She's got me:cool::LOL:
 

Emma35

Registered User.
Local time
Today, 05:10
Joined
Sep 18, 2012
Messages
297
Good suggestions thanks a lot guys. I'll work something out.....it's not a major issue anyway. Thanks again for all the help i appreciate it very much

bob.......your Access abilities are surpassed only by your modesty 😉
 

Emma35

Registered User.
Local time
Today, 05:10
Joined
Sep 18, 2012
Messages
297
Just my penny.... Isn't it much easier to have all choices in a single (unbound)form? Like use a non-visible combo / listbox that becomes visible after the timecheck? I think this is a very complicated way to get a result.
I'm really sorry i completely missed your post. Thank you for the suggestion
 

bob fitz

AWF VIP
Local time
Today, 13:10
Joined
May 23, 2011
Messages
3,836
Good suggestions thanks a lot guys. I'll work something out.....it's not a major issue anyway. Thanks again for all the help i appreciate it very much

bob.......your Access abilities are surpassed only by your modesty 😉
Thank you for your kind words. There'll always be someone here to help you if you need it :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom