Francisco Tapia
fhtapia at gmail.com
Thu Sep 1 22:37:55 CDT 2005
It couldn't be simpler than this, the form is bound to a view, the view source is "Select * From MyTable Where ADE <> 3" When the button is clicked it automatically fires the form's before update... ARG... the before update runs a CheckRRNumber function which checks the current line's information, that way I can assign the current line an RR number when the line item is created, if the current line has the same sn as another lineitem in the list, then I populate the RR number with the pre-existing number. "IF" the SN of the new line is diffrent then I make a round trip to the server to purchase a new line item. Private Sub cmdDELETE_Click() Me.txtADE = 3 Me.Form.Refresh End Sub Private Sub Form_BeforeUpdate(Cancel As Integer) If Nz(Me.txtCPN, "") <> "" Then CheckRRNumber Else Cancel = True Me.Undo End If End Sub On 9/1/05, Stuart McLachlan <stuart at lexacorp.com.pg> wrote: > > On 1 Sep 2005 at 11:55, Francisco Tapia wrote: > > > Thanks for the response... but the event is actually the Form's > > BeforeUpdate, I tried txtADE.text but that doesnt work either. This > > whole process occurs from a command button that I use to mark a hidden > > textbox w/ a 3, so when it receives the new value, I get the > > before_update (on the form) firing. > > > > How about posting the relevant snippets of the button, textbox and form > events so that we can see exactly what you are talking about. > > -- > Stuart -- -Francisco http://pcthis.blogspot.com |PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More...