View Single Post
  #6  
Old October 2nd, 2006, 10:26 PM posted to microsoft.public.access.forms
DawnTreader
external usenet poster
 
Posts: 198
Default Double Click to add

Hello

hopefully someone can help on this problem that I am having that is related
to this.

when i doubleclick to add a new record to the drop down list, it is not
moving me to a new record spot. why? i have the exact same code, except for
the field being used, as shown below.

Private Sub ShippingMethodID_NotInList(NewData As String, Response As
Integer)
MsgBox "Double-click this field to add an entry to the list."
Response = acDataErrContinue
End Sub
Private Sub ShippingMethodID_DblClick(Cancel As Integer)
On Error GoTo Err_ShippingMethodID_DblClick
Dim lngShippingMethodID As Long

If IsNull(Me![ShippingMethodID]) Then
Me![ShippingMethodID].Text = ""
Else
lngShippingMethodID = Me![ShippingMethodID]
Me![ShippingMethodID] = Null
End If
DoCmd.OpenForm "Shipping Methods", , , , , acdialog, "GotoNew"
Me![ShippingMethodID].Requery
If lngShippingMethodID 0 Then Me![ShippingMethodID] =
lngShippingMethodID

Exit_ShippingMethodID_DblClick:
Exit Sub

Err_ShippingMethodID_DblClick:
MsgBox Err.Description
Resume Exit_ShippingMethodID_DblClick
End Sub

i am assuming that the problem is something with the command:

DoCmd.OpenForm "Shipping Methods", , , , , acdialog, "GotoNew"

but what? i have the gotonew part on my line, is there another argument or
part to the DoCmd.OpenForm that is used to get it to move the current record
to a blank one?