can't enter data into form fields


G

George Applegate

I am having a problem in MS/Access, and I don't know that much about
it and would appreciate any help/direction. Sorry this is so long in
advance.

Over the weekend we moved to a new server. We have an access data
base dealing with warranties and related information. In the access
programs, it referred to a customer master file for name/address/etc.
that was linked to a server data base. When we migrated to the new
server that database went away, however, we have an as/400 that I
changed the pointers and associations to for customer information in
the access database - so, instead of pointing to the server for the
customer data base, it now points to the as/400 for the customer data
base information. Until I did this, I was getting errors when it
would be looking for those customer fields. Once I changed each query
to go to the as/400 customer file/fields everything seemed fine.

Until we open the warranty form. Almost all the fields in the
warranty form now seem protected - I can put my cursor into the field,
but I can't change any of the information. Some fields at the bottom
of the warranty entry form I can update and add information to, but
most of the fields on the form I can't change - and I could before.

What would cause this? I am including the visual basic code at the
bottom of this if someone wants to look at it. I didn't know how much
of the form to upload/or could upload so just did the vb code.

I am also getting a 2105 error at the line in bold (code shown below).
Now I am assuming from what I have found on googling 2105, that I
somehow need to give it more time to load the customer database with
the warranty???? How can I do that in vb?? Suggestions??

But why would these fields, which worked fine before, now suddenly not
be modifiable? Also, when I bring up an existing warranty it's the
right data shown, I just can't hardly change any of the fields - and
it wasn't that way before. The customer fields only come into the
form - but then you can override them; also, the form contains MANY
OTHER FIELDS not in the customer file and none of those can be
modified either. Most of the fields that I can't modify are in the
query that links to the customer file. I think I cannot modify any
fields on the form that come from the warranty file, which is linked
through a query to the customer file. But I can't modify any warranty
fields, whether customer related or not. Also, as I said, I can
update some data on the form and that seems to be "sub-forms". There
are 3 sub-forms. Also, if I just edit the table it works fine, it's
just that I can't change the fields using the form??????

I need to get this working and I am thinking it has to be pretty
simple as all I did was change queries to point to a different
customer file than the one before, but the fields stayed the same. I
can't help but think this is all due to the fact that I changed the
customer file pointer to a new file…but since I didn't get any errors,
I'm not sure why it wouldn't work???

As I said, I'm pretty much a novice at this, I just need to get this
program working and would appreciate any suggestions on why it is
giving me the 2105 error at the point in bold, but more importantly,
WHY CAN'T I ENTER/UPDATE FIELDS on the form that I could before????

Thanks in advance
Ga

Private Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As
String, ByVal nCmdShow As Long) As Long

Private Sub Command116_Click()
CDOpen.ShowOpen
If CDOpen.FileName = "" Then Exit Sub
[WARRANTY LETTER].SetFocus
[WARRANTY LETTER].Text = CDOpen.FileName
End Sub


Private Sub Command119_Click()
WinExec "winword K:\FORMS\FORMS\300-Customers\310-1AW.DOC", 10
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii >= 97 And KeyAscii <= 122 Then
KeyAscii = KeyAscii - 32
End If
End Sub

Private Sub Form_Load()

If Me.Filter > "" Then
DoCmd.Maximize
Exit Sub
End If

Dim ans As String, ANS2 As String

Me.Visible = False

NewClaim:
ans = InputBox("Enter Claim #")
If ans = "ALL" Then
Form.Visible = True
Exit Sub
End If

If ans <> "" Then
Form.RecordSource = "SELECT [WARRANTY WITH CUST INFO].* FROM
[WARRANTY WITH CUST INFO] WHERE [WARRANTY CLAIM #] = '" & ans & "'"
Form.Refresh
If Form.Recordset.RecordCount = 0 Then
ANS2 = MsgBox("Warranty claim not found. Start new claim?",
vbYesNoCancel)
If ANS2 = vbYes Then
[WARRANTY CLAIM #].SetFocus ---2105 error is here in debug
[WARRANTY CLAIM #].Text = UCase(ans)
VENDOR.SetFocus
ElseIf ANS2 = vbNo Then
GoTo NewClaim
Else
DoCmd.close acForm, "WARRANTY"
Exit Sub
End If
End If
Me.Visible = True

Else
DoCmd.close acForm, "WARRANTY"
End If

End Sub

Private Sub Form_Unload(Cancel As Integer)
If Me.Filter > "" Then
DoCmd.Quit acQuitSaveNone
End If
End Sub

Private Sub openfile_Click()
On Error GoTo Err_openfile_Click
[WARRANTY LETTER].SetFocus

If [WARRANTY LETTER].Text = "" Then
MsgBox "Please find the file to open first by clicking on 'Find
File'"
Else
WinExec "winword """ & [WARRANTY LETTER].Text & """", 10
End If

Exit_openfile_Click:
Exit Sub

Err_openfile_Click:
MsgBox Err.DESCRIPTION
Resume Exit_openfile_Click

End Sub

George Applegate
(e-mail address removed)
 
Ad

Advertisements

J

Jeff Boyce

George

You have a front-end application that pointed to one set of back-end data.

You did not change the front-end application.

You did change the back-end data source.

You re-pointed the front-end to see the new back-end.

Now you can't update the values in the tables (in the new source).

Just a guess, but since you haven't modified your Access front-end, are
there permission issues with the new back-end?

Regards

Jeff Boyce
Microsoft Office/Access MVP


George Applegate said:
I am having a problem in MS/Access, and I don't know that much about
it and would appreciate any help/direction. Sorry this is so long in
advance.

Over the weekend we moved to a new server. We have an access data
base dealing with warranties and related information. In the access
programs, it referred to a customer master file for name/address/etc.
that was linked to a server data base. When we migrated to the new
server that database went away, however, we have an as/400 that I
changed the pointers and associations to for customer information in
the access database - so, instead of pointing to the server for the
customer data base, it now points to the as/400 for the customer data
base information. Until I did this, I was getting errors when it
would be looking for those customer fields. Once I changed each query
to go to the as/400 customer file/fields everything seemed fine.

Until we open the warranty form. Almost all the fields in the
warranty form now seem protected - I can put my cursor into the field,
but I can't change any of the information. Some fields at the bottom
of the warranty entry form I can update and add information to, but
most of the fields on the form I can't change - and I could before.

What would cause this? I am including the visual basic code at the
bottom of this if someone wants to look at it. I didn't know how much
of the form to upload/or could upload so just did the vb code.

I am also getting a 2105 error at the line in bold (code shown below).
Now I am assuming from what I have found on googling 2105, that I
somehow need to give it more time to load the customer database with
the warranty???? How can I do that in vb?? Suggestions??

But why would these fields, which worked fine before, now suddenly not
be modifiable? Also, when I bring up an existing warranty it's the
right data shown, I just can't hardly change any of the fields - and
it wasn't that way before. The customer fields only come into the
form - but then you can override them; also, the form contains MANY
OTHER FIELDS not in the customer file and none of those can be
modified either. Most of the fields that I can't modify are in the
query that links to the customer file. I think I cannot modify any
fields on the form that come from the warranty file, which is linked
through a query to the customer file. But I can't modify any warranty
fields, whether customer related or not. Also, as I said, I can
update some data on the form and that seems to be "sub-forms". There
are 3 sub-forms. Also, if I just edit the table it works fine, it's
just that I can't change the fields using the form??????

I need to get this working and I am thinking it has to be pretty
simple as all I did was change queries to point to a different
customer file than the one before, but the fields stayed the same. I
can't help but think this is all due to the fact that I changed the
customer file pointer to a new file.but since I didn't get any errors,
I'm not sure why it wouldn't work???

As I said, I'm pretty much a novice at this, I just need to get this
program working and would appreciate any suggestions on why it is
giving me the 2105 error at the point in bold, but more importantly,
WHY CAN'T I ENTER/UPDATE FIELDS on the form that I could before????

Thanks in advance
Ga

Private Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As
String, ByVal nCmdShow As Long) As Long

Private Sub Command116_Click()
CDOpen.ShowOpen
If CDOpen.FileName = "" Then Exit Sub
[WARRANTY LETTER].SetFocus
[WARRANTY LETTER].Text = CDOpen.FileName
End Sub


Private Sub Command119_Click()
WinExec "winword K:\FORMS\FORMS\300-Customers\310-1AW.DOC", 10
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii >= 97 And KeyAscii <= 122 Then
KeyAscii = KeyAscii - 32
End If
End Sub

Private Sub Form_Load()

If Me.Filter > "" Then
DoCmd.Maximize
Exit Sub
End If

Dim ans As String, ANS2 As String

Me.Visible = False

NewClaim:
ans = InputBox("Enter Claim #")
If ans = "ALL" Then
Form.Visible = True
Exit Sub
End If

If ans <> "" Then
Form.RecordSource = "SELECT [WARRANTY WITH CUST INFO].* FROM
[WARRANTY WITH CUST INFO] WHERE [WARRANTY CLAIM #] = '" & ans & "'"
Form.Refresh
If Form.Recordset.RecordCount = 0 Then
ANS2 = MsgBox("Warranty claim not found. Start new claim?",
vbYesNoCancel)
If ANS2 = vbYes Then
[WARRANTY CLAIM #].SetFocus ---2105 error is here in debug
[WARRANTY CLAIM #].Text = UCase(ans)
VENDOR.SetFocus
ElseIf ANS2 = vbNo Then
GoTo NewClaim
Else
DoCmd.close acForm, "WARRANTY"
Exit Sub
End If
End If
Me.Visible = True

Else
DoCmd.close acForm, "WARRANTY"
End If

End Sub

Private Sub Form_Unload(Cancel As Integer)
If Me.Filter > "" Then
DoCmd.Quit acQuitSaveNone
End If
End Sub

Private Sub openfile_Click()
On Error GoTo Err_openfile_Click
[WARRANTY LETTER].SetFocus

If [WARRANTY LETTER].Text = "" Then
MsgBox "Please find the file to open first by clicking on 'Find
File'"
Else
WinExec "winword """ & [WARRANTY LETTER].Text & """", 10
End If

Exit_openfile_Click:
Exit Sub

Err_openfile_Click:
MsgBox Err.DESCRIPTION
Resume Exit_openfile_Click

End Sub

George Applegate
(e-mail address removed)
 

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