469,343 Members | 5,380 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,343 developers. It's quick & easy.

Access Forms "Write Conflict"

12
I'm using Access to create forms with a SQLExpress backend.

My form is for logging purchases. I have a date ordered and a date delivered. (I know the write issue comes from the date)

I've tried adding a TS colum to all of my tables with a timestamp data type (allow nulls). - Still get the error.

My recordset type is "updateable snapshot".

Not sure what else to try. I've looked at all the others with this issue but have yet to find a solution that works for me.

Thank you so much.
Feb 20 '07 #1
17 5945
PRLIT
12
I've also tired this: http://support.microsoft.com/kb/304181 but still no luck.
Feb 20 '07 #2
PRLIT
12
Sorry to keep replying to my own post - does the timestamp field need to be part of the form as well?
Feb 20 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
I'm using Access to create forms with a SQLExpress backend.

My form is for logging purchases. I have a date ordered and a date delivered. (I know the write issue comes from the date)

I've tried adding a TS colum to all of my tables with a timestamp data type (allow nulls). - Still get the error.

My recordset type is "updateable snapshot".

Not sure what else to try. I've looked at all the others with this issue but have yet to find a solution that works for me.

Thank you so much.
This may be a formatting issue. Access stores dates as numbers and this can sometimes cause problems with conflict in date formatting. You may be trying to store dates the invalid numbers representing months as 09/23/06 in mm/dd/yy format has been translated as dd/mm/yy and there is no month 23. To get around this and see if it is the problem change all the date formats to dd-mmm-yyyy. This should stop the confusion.

Mary
Feb 20 '07 #4
PRLIT
12
Should my SQL be Datetime or shortdatetime? What format exactly should the access form be? Thanks!
Feb 21 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
Should my SQL be Datetime or shortdatetime? What format exactly should the access form be? Thanks!
It won't matter what the sql is because access will pass it as a number. The access format needs to be medium date time. Access is the problem here not the sql.

Mary
Feb 21 '07 #6
PRLIT
12
dd-mmm-yyyy

Do you mean dd-mm-yyyy?
Feb 21 '07 #7
PRLIT
12
dd-mmm-yyyy

Do you mean dd-mm-yyyy?
Changed Access to "short date" dd-mm-yyyy

Still get error.

Thank you so much for helping me with this. I've posted on 4 forums now and seems like everyone is stumped.
Feb 21 '07 #8
MMcCarthy
14,534 Expert Mod 8TB
dd-mmm-yyyy

Do you mean dd-mm-yyyy?
No I mean dd-mmm-yyyy (23-Jan-2006)

Access can switch between UK and US date formats so ...

23/01/2006 can be changed to 01/23/2006 which is an invalid date value under dd/mm/yyyy. Using the above format in Access prevents this problem.

Mary
Feb 21 '07 #9
PRLIT
12
hmmm still nada. I really thought I had it. Changed access to "medium date" dd-mmm-yyyy and still got write conflict. I really think this does have something to do with SQL though.
Feb 21 '07 #10
MMcCarthy
14,534 Expert Mod 8TB
hmmm still nada. I really thought I had it. Changed access to "medium date" dd-mmm-yyyy and still got write conflict. I really think this does have something to do with SQL though.
Post the actual VBA code you are using maybe something will jump out.

Mary
Feb 21 '07 #11
PRLIT
12
Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2.  
  3. Private Sub Command23_Click()
  4. On Error GoTo Err_Command23_Click
  5.  
  6.  
  7.     DoCmd.GoToRecord , , acNewRec
  8.  
  9. Exit_Command23_Click:
  10.     Exit Sub
  11.  
  12. Err_Command23_Click:
  13.     MsgBox Err.Description
  14.     Resume Exit_Command23_Click
  15.  
  16. End Sub
  17. Private Sub Command24_Click()
  18. On Error GoTo Err_Command24_Click
  19.  
  20.  
  21.     DoCmd.GoToRecord , , acNewRec
  22.  
  23. Exit_Command24_Click:
  24.     Exit Sub
  25.  
  26. Err_Command24_Click:
  27.     MsgBox Err.Description
  28.     Resume Exit_Command24_Click
  29.  
  30. End Sub
  31.  
  32. Private Sub Form_Activate()
  33. Dim rs As ADODB.Recordset
  34. Set rs = Me.Recordset.Clone
  35. rs.Bookmark = Me.Bookmark
  36. DoCmd.RunCommand acCmdRefresh
  37. Me.Bookmark = rs.Bookmark
  38. rs.Close
  39. Set rs = Nothing
  40. End Sub
  41.  
  42. Private Sub Form_Deactivate()
  43. DoCmd.RunCommand acCmdSaveRecord
  44. End Sub
  45.  
  46. Private Sub Office_ID_AfterUpdate()
  47.     Me.Office_Name = DLookup("[Office_Name]", "Office", "[Office_ID]=" & Me.Office_ID)
  48.  
  49. End Sub
Feb 21 '07 #12
MMcCarthy
14,534 Expert Mod 8TB
1. Are your tables linked to the Access database through odbc?
2. Is the form bound to one of these tables?
a) If so why are you running a save command in the form deactivate event?
b) If not how are the records being saved to the backend?

Mary
Feb 21 '07 #13
PRLIT
12
1. Are your tables linked to the Access database through odbc?
2. Is the form bound to one of these tables?
a) If so why are you running a save command in the form deactivate event?
b) If not how are the records being saved to the backend?

Mary
If it helps, I'm opening an ADP file in access. I connected to the server and all my tables, data was there.

Is the form bound to one of these tables? - I use the form Wizard at frist and it lets me choose from the existing tables. If I enter directly into the tables, it all updates just fine.
Feb 21 '07 #14
MMcCarthy
14,534 Expert Mod 8TB
If it helps, I'm opening an ADP file in access. I connected to the server and all my tables, data was there.

Is the form bound to one of these tables? - I use the form Wizard at frist and it lets me choose from the existing tables. If I enter directly into the tables, it all updates just fine.
Just out of curiousity remove any formatting or masks from the date controls and see if you still have the problem.

Mary
Feb 21 '07 #15
PRLIT
12
Just out of curiousity remove any formatting or masks from the date controls and see if you still have the problem.

Mary
Any just make them varchar?
Feb 22 '07 #16
MMcCarthy
14,534 Expert Mod 8TB
Any just make them varchar?
Just change the formating on the ADP form not in the data.

Mary
Feb 22 '07 #17
NeoPa
32,183 Expert Mod 16PB
I've been trying to look through this thread today and I find that there is simply not enough correct information. It is impossible to find an answer because fundamental information is only provided many posts after it is needed.
If you are still interested in getting an answer to this then please re-post from the beginning, paying particular attention to the instructions in POSTING GUIDELINES: Please read carefully before posting to a forum.

Table MetaData is likely to be required in this case (see example provided below for the format of this info) :
Expand|Select|Wrap|Line Numbers
  1. Table Name=tblStudent
  2. Field; Type; IndexInfo
  3. StudentID; Autonumber; PK
  4. Family; String; FK
  5. Name; String
  6. University; String; FK
  7. Mark; Numeric
  8. LastAttendance; Date/Time
Please don't misunderstand, we do want to help. It is simply that the information you're providing is not adequate for understanding your problem via a website.

MODERATOR.
Feb 22 '07 #18

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by bissatch | last post: by
13 posts views Thread by Jacek Dziedzic | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.