My Assistant
![]() ![]() |
|
|
Nov 11 2009, 12:26 AM
Post
#1
|
|
|
UtterAccess Addict Posts: 243 |
I have form for product sales entry and there is control [Status] which is 1 to 4. Product for data entry has to be status 1 and when item is available for sale I have to change the status to 1 before data entry. How can i change the status while in the form for data entry. Right know I open the other form for the status change I then come back for the form for data entry, but also it does not get update unless I close the form first and open again. Please help.
Thanks |
|
|
|
Nov 11 2009, 12:48 AM
Post
#2
|
|
|
UtterAccess Ruler Posts: 1,100 From: Sacramento, CA USA |
'Requery Sub-form
Form!sfmExpenseDetailEnter.Requery |
|
|
|
Nov 11 2009, 12:59 AM
Post
#3
|
|
|
UtterAccess Addict Posts: 243 |
there is no subform they are two different forms
|
|
|
|
Nov 11 2009, 01:08 AM
Post
#4
|
|
|
UtterAccess Ruler Posts: 1,100 From: Sacramento, CA USA |
Not a problem I was just being lazy and copied the code from mine to ensure that I did not get an error with my hunt and peck typing
Form!(Name of Form).Action or in my case 'Requery Sub-form Form!sfmExpenseDetailEnter.Requery WHere sfmExpenseDetailEnter is the name of the form that I want to requery Michael |
|
|
|
Nov 11 2009, 03:15 AM
Post
#5
|
|
|
UtterAccess VIP Posts: 13,031 From: Leicester, UK |
Michael
I don't think your code to requery the sub form is correct. to requery a subform you would either use me.SubformControlName.requery (if you're calling the requery from the parent form) or forms!ParentFormName.SubformControlName.requery You never need to refer to the name of the actual sub form ** SubformControlName = This is the control on the parent form that holds the sub form in it. A great link for working out how to refer to various form's is : http://www.mvps.org/access/forms/frm0031.htm |
|
|
|
Nov 11 2009, 02:55 PM
Post
#6
|
|
|
UtterAccess Addict Posts: 243 |
I'm not sure if what I'm trying to do is right. Basically I have form for data entry and another form for product status, whil I'm in the data entry form I want to be able to change the status and at the same time get this information update in the data entry form.
|
|
|
|
Nov 12 2009, 12:39 AM
Post
#7
|
|
|
UtterAccess Ruler Posts: 1,100 From: Sacramento, CA USA |
I agree you are doing it correctly, I am doing exactly the same thing, and while it looks like my reference may be incorrect, it is functioning as intended. I wll look at the link posted by Danny and see if I need to change my code. It sounds like I will need to.
Danny - thank you for correcting me. Michael |
|
|
|
Nov 12 2009, 11:33 AM
Post
#8
|
|
|
UtterAccess Addict Posts: 243 |
Where do the codes go?.
Thanks |
|
|
|
Nov 12 2009, 12:23 PM
Post
#9
|
|
|
UtterAccess Ruler Posts: 1,100 From: Sacramento, CA USA |
Depends on how you are running your procedures,
On mine I have a comand button on the main form which createse a record in the other table Specifically I have a button on my expense form which when pressed creates an invoice. It then requeries the sub.form and then brings the invoice number to the sub form to create the link. So in my case I have a command button on the main form to do several task on click. I'm not quite sure of what you are tying to do. Do you want to post a sample with your question??? Here is a link to a sample I posted by way of example http://www.utteraccess.com/forums/showflat...1903377&Zp= Michael |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 21st May 2013 - 04:19 AM |