GoToRecord New
May 9, 2005
I'm having trouble getting my subform to go to new record from a main form.
How would I go about making a command button(new record) on a main form link to a subform.
Example: After clicking on command button I would like my main form and subform to go to new record.
Thanks,
Michael
View Replies
ADVERTISEMENT
May 7, 2007
I have the following code in my VB:
DoCmd.GoToRecord , [Response Tasks], acGoTo = [Response_ID], "08"
This is not working however.... The table name is Response Tasks, the Column name is Response_ID and I am trying to pull the info from the one named "08". What am I doing wrong in the procedure?
Thanks in advance
View 5 Replies
View Related
Sep 1, 2005
Hi All,
I have a subform in which users kan edit a field. Some contain more than 100 records. After 'an edit' the code save the adjustments in the table. Then the subform automatically jumps to the first record, but I want it to go to the previous record which they just edited. Is that possible? Here's the code so far:
Private Sub Afgehandeld_Click()
If Afgehandeld.Value = 0 Then
AfgDatum.Value = Null
DoCmd.Save
Me.Requery
Else:
DoCmd.OpenForm "formulier5"
End If
DoCmd.Save
Me.Requery
End Sub
View 1 Replies
View Related
May 25, 2006
Hi there I currently have a DB with a ton of records. What I want to do is have a search box pop up when the user presses a button on the main form. When this search box comes up there is a list box with all the records. The user will then double click a record on the List box and it should appear on the main form. However this is not happenening. Here is my code for the double click in the list box.
Private Sub List3_DblClick(Cancel As Integer)
On Error GoTo Err_List3_DblClick
' Open the info form based on the selection in this listbox.
Dim strFormName As String
strFormName = "complaints"
DoCmd.OpenForm strFormName
DoCmd.GoToRecord , strFormName, acGoTo, " caseid = " & Me![List3] (I think this is where the error is)
DoCmd.Close acForm, "frmLookup"
Exit_List3_DblClick:
Exit Sub
Err_List3_DblClick:
Someone please help!!!
thanks
MsgBox Err.description
Resume Exit_List3_DblClick
End Sub
View 1 Replies
View Related
Apr 23, 2008
Hi,
I have a subform on a tab control. How do I go to the last record of that sub form?
If I use the original form (not as a sub-form), the following code works, but when in the tab control I get an error that "blah blah Form is not open"
Any suggestions? Thanks
Code:DoCmd.GoToRecord acDataForm, "Stock Transfer", acLast'works when main form, but not as subform =/
View 8 Replies
View Related
Oct 27, 2005
Hi there
I am making a form that has been set up to have a number of tabs so I can have more then 1 page on the form.
One of the tab pages is used as a search form.There is a couple of textboxes and a listbox where the results end up
What I am trying to do is have a double click set up on the listbox so I can double click the result I want and have the forms ID goto that record.
Its a bound form. The primary key is called PersonalID and its bound to a txtbox called txtPersonalID.
this is my code but its not working
Private Sub lstSearchResults_DblClick(Cancel As Integer)
Dim strPersonalID As String
strPersonalID = Me.lstSearchResults.Column(0)
DoCmd.GoToRecord acActiveDataObject, "PersonalID", acGoTo, strPersonalID
DoCmd.GoToControl "pgePersonalInformation"
End Sub
When I try run the code I get an error 2489. saying The object 'PersonalID' isn't open.
What am I doing wrong?
Can anyone help out
TIA
View 2 Replies
View Related
Aug 15, 2006
i have a listbox that manipulates records on another form but in case i click on one of the records in the listbox that doesnt have any corresponding record in the other form then instead of it saying that it cant locate the record i would like the form to go to a new record....
i've been trying at it but cant get it right...
plz assist... anyone.
View 14 Replies
View Related
Dec 28, 2014
On a Single Form with a sub-form I have set up the typical navigation buttons using the DoCmd.GoToRecord, ,acx where x = Next, Previous.
These navigate through the sub form records. I only want to navigate through the master records.
Extensive searching did not turn up the answer. There are many articles on moving through the sub-fom but nothing about just the master.
View 4 Replies
View Related
Aug 30, 2007
hi
could you please tell me what action will be happned when this both statement executed..
DoCmd.GoToRecord , , A_NEWREC
SendKeys "%N", True
Form ahse defines these statement as well.
Option Compare Database
Option Explicit
View 2 Replies
View Related
Jul 20, 2005
I have searched the forum for questions similar to mine, but they all seem more complicated than what I need... and so I am getting a little confused with it all!
I would like to create a "GoToRecord" field in which people can enter a name which then take them to that record (stored in my "ClientName" field) on the Main form...
Can anyone help?
Tx!!
frederique.
View 2 Replies
View Related