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!

Is there a way

Status
Not open for further replies.

Ascentient

IS-IT--Management
Nov 4, 2002
267
to lock the column widths in place on a subform so that the user cannot increase them, thus causing scroll bars to appear?
 
Is it possible for you to use a continuous form rather than a datasheet?
 
Remou,
Thanks for the response. I changed it to continous and it has accomplished what I needed.

However, I have a manually incremented line counter that needs to be adjusted if a line item is deleted. I have the following code set into the subform's form After Delete event

Code:
   Dim intLineNo As Integer
   Dim rstClone As DAO.Recordset
   Set rstClone = Me.RecordsetClone
   With rstClone
      .MoveFirst
      Do While Not .EOF
         intLineNo = intLineNo + 1
         .edit
         Me.PO_DET_LINE_NO = intLineNo
         .update
         .MoveNext
      Loop
   End With
   Set rsClone = Nothing

To sum it up, the code is suppose to move to the top of the recordsetclone in the subform and loop through the records and reassigns the line #. The problem is .movefirst and .movenext don't appear to be working.

I have used this method before, but for someone reason it does not want to work now.

Thoughts, suggestions, a different method?
Ascent
 
I think you mean:
[tt]rstClone.PO_DET_LINE_NO = intLineNo[/tt]
Rather than Me.PO_DET_LINE_NO = intLineNo.
 
Thanks
Code:
rstClone![PO-DET-LINE-NO] = intLineNo

worked.

The I was using the wrong field reference too! The programmer who set this up originaly used bad naming conventions when coding.

Thanks for the help.
 
Remou,
Is there a way to cancel changes on a subform when an Exit button is pressed on the main form? (Record changes or deletes)

 
I am fairly sure that you cannot do this. Perhaps you can use a temporary table either for the subform, or to save a copy of the record that can be substituted?
 
Thats what I was thinking, but I thought I would bounce it for comment.

Thanks again,
Ascent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top