Bound field problem ....

cheer

Registered User.
Local time
Tomorrow, 01:08
Joined
Oct 30, 2009
Messages
222
Look at the attachment below for the problem that I am having. Appreciate if there is any suggestion to me.

TQ
 

Attachments

  • Any solution to bound field.JPG
    Any solution to bound field.JPG
    56.5 KB · Views: 127
Have you checked your Relationships? The image you uploaded doesn't tell us much to help you over come this.
 
I have attached a sample of form which is not executable because I have just started coding the form. All fields are bound fields. The attachment do not have other objects too.

Upon successfully loading the form , the Operator text box should be filled up with the login ID from frmLogin (I do not attach this form inside the attachment).

Form work well with the first record. However, when I start creating second and more records, I have not idea how to auto reset the login ID to the Operator text box. Can Anyone suggest some help to me to resolve the problem ?
 

Attachments

Last edited:
You need to place the table in the sample database as well as the log in form.

Can't do anything without it.;)
 
From your brief description and the fact that it works for the first record only, it would appear that you're assigning the UserID to the Operator Textbox using Form_Load or Form_Open event. To have this occur for all new records added during this session, you'd need to use the Form_Current event, instead, something along the lines of:
Code:
Private Sub Form_Current()
If Me.NewRecord Then
  Me.OperatorTextboxName = UserID 
End If
End Sub
Linq ;0)>
 
From your brief description and the fact that it works for the first record only, it would appear that you're assigning the UserID to the Operator Textbox using Form_Load or Form_Open event. To have this occur for all new records added during this session, you'd need to use the Form_Current event, instead, something along the lines of:
Code:
Private Sub Form_Current()
If Me.NewRecord Then
  Me.OperatorTextboxName = UserID 
End If
End Sub
Linq ;0)>

Thanks for the above code. However, I am wondering the code below is executed when I try to DELETE a record. How to prevent this because I have other codes go along after the OperatorTextboxName = UserID ?
If Me.NewRecord Then
Me.OperatorTextboxName = UserID
End If
 
Where have you placed the code? There's no reason for this code to run when Deleting a Record, unless you've placed it in an event related to deletion. It was supposed to be in the Form_Current event.
 
Where have you placed the code? There's no reason for this code to run when Deleting a Record, unless you've placed it in an event related to deletion. It was supposed to be in the Form_Current event.

I have made a mistake with above typing.

However, if there are total of 3 records have been typed in, with the Form_Current event written, I can't delete the last record only. This means the earlier 2 records can be successfully deleted.

See below attachment. However, record can't be smoothly deleted after I comment the Form_Current event

I have substituted with the Form_BeforeInsert event n it works .
 

Attachments

  • RFQ New Screen.jpg
    RFQ New Screen.jpg
    107.5 KB · Views: 98
Last edited:
Private Sub Form_Current() If Me.NewRecord Then Me.OperatorTextboxName = UserID End If End Sub
If there are some condition fail, how to undo the NewRecord method ?
 

Users who are viewing this thread

Back
Top Bottom