|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
NORMALLYBOUND CONTINEOUS FORMS AUTOMATICALLY INSERT/PREPARE A BLANK RECORD. AS THE USER CLICK IN THAT RECORD AND TYPE ANY THING, ANOTHER NEW BLANK RECORD IS APPENDED.
I WANT TO BYPASS THIS BEHAVIOUR!!!! A CONTINUOUS FORM SHOULD APPEND A FRESH RECORD ONLY WHEN USER CLICK ADD NEW BUTTON. AFTER ADDING ONE RECORD, IF USER WANT TO APPEND ANOTHER RECORD IN THE FORM THEN HE MUST AGAIN CLICK ADD NEW BUTTON AND ALL APPENDED RECORD SHOULD BE COMMITTED TO TABLE WHEN USER CLICK SAVE BUTTON. IF USER CANCEL THEN RECORDS (APPENDED BY USER) SHOULD BE CANCELLED. ANY SOLUTION…????? SOME ONE CAN ADVISE ME.ALLOWADDITION OR ME.ALLOWEDITS PROPERTY , I USED IT BUT IT DID NOT WORK. I NEED AN URGENT REPLY… I M IN A BIG TROUBLE. S. OBAID Last edited by ubaid_Syed : September 21st, 2003 at 07:37 AM. |
|
#2
|
|||
|
|||
|
Did you ever figure this out? I'm not sure why you'd want to do this in a continous form, however, it seems you should create unbound fields and have the save button save it using ADO. Or another option would be to have a cancel button run docmd.undo. It all depends your preference.
On the issue of me.allowaddition and that stuff.. that's a work around to not display the bottom form.. interesting idea. You can create an "on click" even that makes me.allowaddition = true But you'd probably have to have an event, afterUpdate to make me.allowaddition = false Seems like this would slow down data entry. Let me know if you still need help and we can discuss this further. |
|
#3
|
|||
|
|||
|
Hi,
probably a bit late but I had the same problem recently. as you say, new record is created as soon as user clicks, even if data is incomplete. So, I made cancel button, not just exit, but also DELETE the last record (the half completed one..) Nick |
|
#4
|
|||
|
|||
|
Cool Solution
Here is the code I used to solve that problem. It uses Nikos' idea but it doesn't prompt you to remove the redundant blank fields. It will automatically blast the blank field on LostFocus. Here is what I did:
Private Sub continuousField_LostFocus() If IsNull(Me.continuousField) Or Me.continuousField = "" Then DoCmd.SetWarnings False ' Warnings Off DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 DoCmd.SetWarnings True ' Warnings On End If End Sub This way it won't warn you about the delete and then will reactivate warnings after the code has gone through. I hope this helps. Hope this finds you well. -X |
|
#5
|
|||
|
|||
|
What Access version does this apply to?
I am trying your suggested code.
I am running Access 97. Problem I get is that it says I cannot delete "Control can't be edited - it is bound to AutoNumber field "ID1". Am I doing something wrong ? My form is based on a query. |
|
#6
|
|||
|
|||
|
Dumb Question
sifu,
If the field was bound to an autonumber field but you are using the field next to it, how could you delete it before? I am confused how this is now a problem. How is your data being utilized in this form. I would need a little more detail to help you out. Thanks, X |
|
#7
|
|||
|
|||
|
Continuous form behaviour
I had this problem (if I understand right). I solved it by going to the form's properties and setting "Allow Additions" to No.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > MS Access - Continuous Form....HELP!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|