Kiwi-Wombat
Registered User.
- Local time
- Today, 15:12
- Joined
- Aug 2, 2004
- Messages
- 56
Hi
I am having trouble with subforms
In the Public module I have:
Public varRecipeID As Integer
Public RecipeClone As Recordset
I have a tab control set up with a data entry subform on one page and a viewing form on another
When the data is saved I want to switch to the viewing page with the same record showing.
After I have saved the newly enetered data, I run this code
varRecipeID = RecipeID
Requery
Set RecipeClone = Me.RecordsetClone
RecipeClone.FindFirst "RecipeID = " & varRecipeID
Me.Bookmark = RecipeClone.Bookmark
RecipeClone.Close
Then switch to the viewing page
However the viewing page only ever shows the first record in the table and not the one I just saved
What am I doing wrong
I am having trouble with subforms
In the Public module I have:
Public varRecipeID As Integer
Public RecipeClone As Recordset
I have a tab control set up with a data entry subform on one page and a viewing form on another
When the data is saved I want to switch to the viewing page with the same record showing.
After I have saved the newly enetered data, I run this code
varRecipeID = RecipeID
Requery
Set RecipeClone = Me.RecordsetClone
RecipeClone.FindFirst "RecipeID = " & varRecipeID
Me.Bookmark = RecipeClone.Bookmark
RecipeClone.Close
Then switch to the viewing page
However the viewing page only ever shows the first record in the table and not the one I just saved
What am I doing wrong