Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to enter text in text box

Status
Not open for further replies.

radiance

Programmer
Jan 4, 2003
164
US
I had to update an access 97 database to access 2000. i modified a few of the objects. however when I run the application for testing, I can not enter numeric values or select entries from the subform.

what could be some reasons behind this? allowEdits is set to yes, I have changed everything and I just can't figure out why this is happening...
 
Does the DB compiles properly ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
You can't enter Numeric values? ...can you enter text values?

Check all properties...,
Subform, enabled/locked.
Check the recordsource, any calculated fields.
Any of the controls, enabled/locked?
 
i can't enter anything. i just get a beep when i try to enter values. I have been trying to make changes, but nothing seems to work.
 
have you checked the text box properties to see if it is locked?
 
i checked all of the properties and nothing is locked.

this was formerly a 97 application which i had to resurrect and convert to 2000. i read that there may be some issues during conversion, which i am having.
 
Again, does the database compiles properly ?
When in the VBE (Alt-F11) menu Debug -> Compiles ...
 
Like PHV said, first see if it compiles.

I highly doubt this is it, is youe recordsource an
uneditable query eg. UNION, TOTALS, DISTINCT etc..
 
Make sure the field exist in your table. If it does delete the field in your form and copy it back over from the field list. Does it work now?

Life's a journey enjoy the ride...

jazzz
 
1) I compiled and there are no errors.
2) I created another field in the table and called it dubs, I still can't enter anything (text or numbers).
3) I removed the field in my form and copied it back over and nothing works.

In my editrec_Click() sub below, once the user clicks yes to the msgBox, which just acknowledges the record they are editing, that field for txtdubs (which is what i named it on the form, but it references 'dubs', new field) is in focus. The user should just be able to enter a numeric value. But nothing happens and I can't see what the error may be.

Code:
Private Sub editrec_Click()
Dim dbs As Database
Dim rs As DAO.Recordset
Dim sShow As String

Set dbs = CurrentDb()

sShow = "Select * from [tbl_request item] WHERE [fk request ID] = " & Form_frmTapeRequestItemsV2.[fk request ID] & _
" and [fk tape ID]= " & Form_frmTapeRequestItemsV2.[fk tape ID]

Set rs = dbs.OpenRecordset(sShow)

MsgBox "You have selected Tape: " & rs![fk tape ID] & " for editing.  You can now enter the # of Dubs."

Me.txtdubs.SetFocus
Me.txtdubs.BackColor = vbYellow

'Dim showDubs As Integer
'showDubs = [Forms]!Form_frmTapeRequestItemsV2![txtdubs]

DoCmd.SetWarnings True

Exit_EditRow_Click:
    Exit Sub

Err_EditRow_Click:
    MsgBox Err.description
    Resume Exit_EditRow_Click
 
What about adding rs.Close: Set rs = Nothing after the MsgBox call ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Has anyone messed with security? If so do you have permission to add, edit, or delete records on this form or table.

Life's a journey enjoy the ride...

jazzz
 
no one has altered security. i have full access to the app.


I figured out that the field for dubs works when i am adding a record and I have the 'dubs' field now as unbound. is this ok? changes can't be made when the field is bound... but, when I insert the number of dubs and I have several records, I can't enter different numbers for the dubs. It just enters the default value of 1. this by no means resolves my edit issue, but this is alot closer than i where i was.

the user is actually working on a subform, which is a part of the overall request page. This page has a lot of code, but I think the action is being called on the cmdSave button on the request page (but this may not be the case):

Code:
'from request page
Private Sub cmdsave_Click()
Dim ians As String

On Error GoTo Err_cmdsave_Click
If Me.DataEntry = True Then
Me.DateReceived = Me.DateRequested
End If

If Me.Department.ListIndex < 0 Then
    MsgBox "Please select a Department.", vbOKOnly, "Error"
    Department.SetFocus
    Else
    If Me.Library.ListIndex < 0 Then
    MsgBox "Please select a library.", vbOKOnly, "Error"
    Library.SetFocus
    Else
    If IsNull(Form_frmTapeRequestItemsV2.[fk tape ID]) Then
    
    MsgBox "You must add at least one item to be dubbed.", vbOKOnly, "Error"
    
    Else
    'DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Dim sUpdate As String

sUpdate = "Update [tbl_request item] SET [dubs]= " & [Dubs] & _
"WHERE [fk request id] = " & Form_frmTapeRequest.Request_ID

DoCmd.RunSQL sUpdate
    
ians = MsgBox("Request saved, would you like to add another one?", vbYesNo, "Tape Library")

If ians = vbYes Then
DoCmd.GoToRecord , , acNewRec

Else

'update the records in tape request and send email

sendEmailCDO " ", " ", "New Tape Requests"

MsgBox "Thank you. An email has been sent regarding your tape request."

DoCmd.SetWarnings True

DoCmd.Close

Form_frmRequest.lsRequest.Requery

    End If
    End If
    End If
    End If
Exit_cmdsave_Click:
    Exit Sub

Err_cmdsave_Click:
    MsgBox Err.description
    Resume Exit_cmdsave_Click
    
End Sub

what type of logic would i need for an unbound form?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top