Cannot save record (1 Viewer)

Petros

Registered User.
Local time
Today, 22:25
Joined
Jun 30, 2010
Messages
145
Hi all, I am encountering this issue when wanting to save edits...this is the setup

Unbounded Form A including two forms and one text-relay control.
Bounded sub form “records due today”. Source Query Today. Related tables 1 and 2. The query includes date criteria. Data displayed in continuous form. Non editable
Unbounded Text relay control: =[Cases_Due_Today].[Form]![CaseID]
Bounded sub form “case”. Single view. Editable. Source Query case. Related tables 1 and 2. This query
Does not have any criteria. Linked master field: Textrelay. Linked child field: CaseID
When i edit the record in form “case”..and want to exit i receive the “Cant save the record etc etc”..however..the editable data is saved...

What am i doing wrong and how can i fix it..Thanks!
 

RuralGuy

AWF VIP
Local time
Today, 14:25
Joined
Jul 2, 2005
Messages
13,826
I believe Access is trying to tell you what is wrong with the "etc etc" part of the message. Can you give us that part too?
 

Petros

Registered User.
Local time
Today, 22:25
Joined
Jun 30, 2010
Messages
145
"-You can't save the record at this time

Access may have ancountererd an error while trying to svae the record
If you close this object now, the data changes you made may be lost
Do you want to close the database anyway "...

The back end is on a SQL 2008..

Thanks!
 

RuralGuy

AWF VIP
Local time
Today, 14:25
Joined
Jul 2, 2005
Messages
13,826
I'm sorry but I can't even hazard a guess on this one. Maybe someone with more knowledge will drop by this thread. I'll ask the VIP's to look in on this thread.
 

Petros

Registered User.
Local time
Today, 22:25
Joined
Jun 30, 2010
Messages
145
No Worries Rural, your intentions are much appricaited. :)
 

RuralGuy

AWF VIP
Local time
Today, 14:25
Joined
Jul 2, 2005
Messages
13,826
I've placed an assistance request post in the VIP forum. Now we just wait and see.
 

LPurvis

AWF VIP
Local time
Today, 21:25
Joined
Jun 16, 2008
Messages
1,269
Do you have a Timestamp column in the SQL tables involved in both form's sources?
If so, do you need it?

Failing that, you can always grab the read only form's source by an alternative method than the editable form's. For example it's read only nature would make it a good option for a passthrough query - or a disconnected recordset.

There are options - they just require a bit more effort.
If the TimeStamp proves fruitless, examples of the others are possible (and fairly common already really).

Cheers.
 

Petros

Registered User.
Local time
Today, 22:25
Joined
Jun 30, 2010
Messages
145
Gentlemen, thank you for your effort. I will look into the timestamp issue..

Thanks!
 

LPurvis

AWF VIP
Local time
Today, 21:25
Joined
Jun 16, 2008
Messages
1,269
No worries and no worries. ;-)

There's every chance that you will need a TimeStamp column (if you've unassigned Bits or Floating Point precision column types).
And a TimeStamp can give certain performance advantages.
It can have side effects though with two subforms pointing to the same source. (This should only manifest when editing both sources - but Jet may be holding a lock on even the supposedly read only one).

If you need to maintain the TimeStamp then, as I say, another means of fetching (or displaying) the read only list might be worthwhile.
As an even simpler example - see what happens when you make it a listbox. No write lock to be held there.

Cheers.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 21:25
Joined
Sep 12, 2006
Messages
15,662
Hi all, I am encountering this issue when wanting to save edits...this is the setup

Unbounded Form A including two forms and one text-relay control.
Bounded sub form “records due today”. Source Query Today. Related tables 1 and 2. The query includes date criteria. Data displayed in continuous form. Non editable
Unbounded Text relay control: =[Cases_Due_Today].[Form]![CaseID]
Bounded sub form “case”. Single view. Editable. Source Query case. Related tables 1 and 2. This query
Does not have any criteria. Linked master field: Textrelay. Linked child field: CaseID
When i edit the record in form “case”..and want to exit i receive the “Cant save the record etc etc”..however..the editable data is saved...

What am i doing wrong and how can i fix it..Thanks!

can you just clarify this.

you have an outer unbound container form, a single subform (1), and a continuous subform (2), bound to the same tables?

and subforms 1 and 2 are linked together.

I don't follow exactly what you are doing, but suspect that maybe you are saving the record in subform(2) , and the error message relates to subform(1). (or vice versa)

I would be inclined to
a) put record selectors on both subforms, so you can see when a record goes dirty.

Note that if you explicitly write a value to a control, even if it is the same value as the existing value, I think that might make a record dirty.

b) put some temporary code in an error event, to identify the form causing the error.
 

Petros

Registered User.
Local time
Today, 22:25
Joined
Jun 30, 2010
Messages
145
Hi Gemma,

i ended up in this situation since i was not capable of coding a split form properly. Yes they are linked to the same table. The continoius form has record selectors and the single form is relayed to the continous form via an unbound textbox. I click on the record selector and the selected record becomes visible in the single form. The continous form is not editable, only the single form, both forms are sourced to separate queries, and both queries are sourced to the same table.

Thanks!
 

Users who are viewing this thread

Top Bottom