Search results

  1. W

    retrieving new value after insert

    ok, fortunately this is a standalone db :D
  2. W

    resetting combo box

    Hi when my form opens, the combo box shows blank until a user selects a value. I want the combo box to be blank each time a new record is selected. So that the last selection for the previous record doesnt get used in error. WD
  3. W

    retrieving new value after insert

    thanks for the reply this does the job runs first... DoCmd.RunSQL "INSERT INTO clientservices ( serviceid, stuid, orgid ) VALUES ( " & serviceid & ", " & stuid & "," & orgid & " )" then this.... DoCmd.RunSQL "INSERT INTO invoice ( clientid, [date], total ) SELECT Max...
  4. W

    retrieving new value after insert

    I have an insert query that inserts to a table that has an autonumber as pkey, the pkey is auto incremented when query runs. I then want to insert that new pkey value in another table. Both these insert queries run off the same button, after the first query runs I need some code or query that...
  5. W

    reset controls ( format = currency ) value

    Thank you Pat, it was that simple!! WD
  6. W

    insert query peoblem

    Hi thanks for the reply, this what I got to work. Dim invdate As Variant Dim stuid As Variant Dim total As Variant invdate = Me.txtdate.Value stuid = Me.txtstuid.Value total = Me.txttotal.Value DoCmd.RunSQL "INSERT INTO invoice ([date], total, stuid) VALUES (#" & invdate &...
  7. W

    reset controls ( format = currency ) value

    I have a form that is populated from a combo box selection (userid) another combo box selects a value which is then multiplied by the value in another text box, the total is then displayed in a second textbox. This value along with several other fields is then inserted into a table. I want to...
  8. W

    insert query peoblem

    Hi, can anyone tell me why this query isn't working? the error message is: runtime error 3134 Syntax error in insert statement. Private Sub btncommit_Click() Dim invdate As Variant Dim sid As Variant Dim total As Variant invdate = Me.txtdate.Value sid =...
  9. W

    Calculation on form not working

    Thanks for the replies, have sorted it out Private Sub txtlessonnum_AfterUpdate() Dim numlessons As Variant Dim total As Integer numlessons = Me.txtlessonnum & "" If (Me.cmblesson = 1) Then total = ((50 / 3) * numlessons) ElseIf (Me.cmblesson = 2) Then...
  10. W

    Calculation on form not working

    Hi, I have a form where I enter student data and lesson details such as lesson type number of lesson and total cost the following code is supposed to do the calculation to provide the total cost and display it in the txttotal text box. It doesn't :( Private Sub txtlessonnum_Exit(Cancel As...
Back
Top Bottom