Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 21st, 2003, 03:28 AM
ubaid_Syed ubaid_Syed is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: KARACHI, PAKISTAN
Posts: 7 ubaid_Syed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post MS Access - Continuous Form....HELP!!!

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.

Reply With Quote
  #2  
Old September 30th, 2003, 11:47 AM
Trevahaha Trevahaha is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 6 Trevahaha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #3  
Old November 30th, 2003, 04:38 AM
nikos nikos is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 1 nikos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old December 10th, 2003, 02:36 PM
Xcalibur37 Xcalibur37 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 3 Xcalibur37 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #5  
Old January 6th, 2004, 05:58 AM
sifu sifu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 3 sifu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 47 sec
Reputation Power: 0
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.

Reply With Quote
  #6  
Old January 7th, 2004, 10:53 AM
Xcalibur37 Xcalibur37 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 3 Xcalibur37 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #7  
Old February 12th, 2004, 07:49 AM
SystemsGuy SystemsGuy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 2 SystemsGuy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > MS Access - Continuous Form....HELP!!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT