Urgent Hep Needed

R

richaluft

Hi:
(This is a re-edit of previous post)


Suddenly find that when I enter data into data entry forms, no updates
are appearing in the underlying tables! They worked just fine until
now>
Have tried to compact and repair to no avail. Backup Db is similarly
affected.
Northwind Db seems to function OK.
My Db is front and back-end, but both are on same pc.

Anyone have any idea what might have gone awry?
 
J

John W. Vinson

Hi:
(This is a re-edit of previous post)


Suddenly find that when I enter data into data entry forms, no updates
are appearing in the underlying tables! They worked just fine until
now>
Have tried to compact and repair to no avail. Backup Db is similarly
affected.
Northwind Db seems to function OK.
My Db is front and back-end, but both are on same pc.

Anyone have any idea what might have gone awry?

Try deleting all the tables in the frontend (this will just delete the links,
not the tables themselves), and use File... Get External Data... Link to
relink to the backend. Might the backend or frontend have been moved, or a
network share name changed, or Windows Security changed on one of the folders?
 
R

richaluft

Try deleting all the tables in the frontend (this will just delete the links,
not the tables themselves), and use File... Get External Data... Link to
relink to the backend. Might the backend or frontend have been moved, or a
network share name changed, or Windows Security changed on one of the folders?

John:
I have realized that the problem I'm having is more specific than I
first thought. My form has a field [ID#] which is filled by a
NextCustomCounter function. When the function is called, the
appropriate value for NextCustomCounter is obtqined by the function,
but this correct value is, for some unknown reason, not being passed
to the calling function. A value of '0' is passed, which is
inappropriate for the field, thus the underlying recordset is not
being updated.
Any idea why this should suddenly be happening?
(I did try to re-link the front and back end tables thinking that this
might somehow be related, but to no avail)

Thanks, Richard
 
J

John W. Vinson

I have realized that the problem I'm having is more specific than I
first thought. My form has a field [ID#] which is filled by a
NextCustomCounter function. When the function is called, the
appropriate value for NextCustomCounter is obtqined by the function,
but this correct value is, for some unknown reason, not being passed
to the calling function. A value of '0' is passed, which is
inappropriate for the field, thus the underlying recordset is not
being updated.
Any idea why this should suddenly be happening?

Not without seeing the code or how you're calling it, no.
 
R

richaluft

I have realized that the problem I'm having is more specific than I
first thought. My form has a field [ID#] which is filled by a
NextCustomCounter function.  When the function is called, the
appropriate value for NextCustomCounter is obtqined by the function,
but this correct value is, for some unknown reason, not being passed
to the calling function.  A value of '0' is passed, which is
inappropriate for the field, thus the underlying recordset is not
being updated.
Any idea why this should suddenly be happening?

Not without seeing the code or how you're calling it, no.

John:
Code As follows:

Private Sub Address_AfterUpdate()
Me![Client ID#] = Next_Custom_Counter_Client_ID_()
End Sub

Public Function Next_Custom_Counter_Client_ID_()
On Error GoTo Next_Custom_Counter_Client_ID__Err
'ForInsurer PolicyType Num
Dim MyDb As DAO.Database, MyTable As DAO.Recordset, NextCounter As
Integer

'open table & get next available number & increment value

Set MyDb = CurrentDb()
Set MyTable = MyDb.OpenRecordset("CounterTblClientID")
MyTable.Edit
NextCounter = MyTable("Next Available Counter")
MyTable("Next Available Counter") = NextCounter + 1
MyTable.update
Next_Custom_Counter_ClientID = NextCounter
Exit Function

Next_Custom_Counter_Client_ID__Err:
MsgBox "Error " & Err & ": " & Error$
If Err <> 0 Then Resume
End
End FunctionNote that identical construction of Sub and Functions are used for
other CustomCounter routines with no problem.

Richard
 
R

richaluft

I have realized that the problem I'm having is more specific than I
first thought. My form has a field [ID#] which is filled by a
NextCustomCounter function.  When the function is called, the
appropriate value for NextCustomCounter is obtqined by the function,
but this correct value is, for some unknown reason, not being passed
to the calling function.  A value of '0' is passed, which is
inappropriate for the field, thus the underlying recordset is not
being updated.
Any idea why this should suddenly be happening?

Not without seeing the code or how you're calling it, no.

John:
Code as follows:

Private Sub Address_AfterUpdate()
Me![Client ID#] = Next_Custom_Counter_Client_ID_()
End Sub

Public Function Next_Custom_Counter_Client_ID_()
On Error GoTo Next_Custom_Counter_Client_ID__Err
'ForInsurer PolicyType Num
Dim MyDb As DAO.Database, MyTable As DAO.Recordset, NextCounter As
Integer

'open table & get next available number & increment value

Set MyDb = CurrentDb()
Set MyTable = MyDb.OpenRecordset("CounterTblClientID")
MyTable.Edit
NextCounter = MyTable("Next Available Counter")
MyTable("Next Available Counter") = NextCounter + 1
MyTable.update
Next_Custom_Counter_ClientID = NextCounter
Exit Function


Next_Custom_Counter_Client_ID__Err:
MsgBox "Error " & Err & ": " & Error$
If Err <> 0 Then Resume
End
End Function

As mentioned, similar sub and function works fine for other
customcounter values in Db. The only difference in the forms is that
client ID field is on form header, while other values are on form
detail section, if this might matter.

Regards, Richard
 
R

richaluft

John said:
I have realized that the problem I'm having is more specific than I
first thought. My form has a field [ID#] which is filled by a
NextCustomCounter function. When the function is called, the
appropriate value for NextCustomCounter is obtqined by the function,
but this correct value is, for some unknown reason, not being passed
to the calling function. A value of '0' is passed, which is
inappropriate for the field, thus the underlying recordset is not
being updated.
Any idea why this should suddenly be happening?

Not without seeing the code or how you're calling it, no.

Code as follows:
Public Function Next_Custom_Counter_Client_ID_()
On Error GoTo Next_Custom_Counter_Client_ID__Err
'ForInsurer PolicyType Num
Dim MyDb As DAO.Database, MyTable As DAO.Recordset, NextCounter As
Integer

'open table & get next available number & increment value

Set MyDb = CurrentDb()
'Set MyTable = MyDb.OpenRecordset("CounterTblClientID")
MyTable.Edit
NextCounter = MyTable("Next Available Counter")
MyTable("Next Available Counter") = NextCounter + 1
MyTable.update
Next_Custom_Counter_ClientID = NextCounter
Exit Function

'Next_Custom_Counter_Client_ID__Err:
MsgBox "Error " & Err & ": " & Error$
If Err <> 0 Then Resume
End
End Function

Calling Sub:
Private Sub Address_AfterUpdate()

Me![Client ID#] = Next_Custom_Counter_Client_ID_()
End Sub

Hope this helps
Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top