I'm able to open up any of my Forms to a new Record, great! Now I would like to know if/how after I'm finish with one Record in a Form when I hit the 'Refresh" instead of going back to the first Record I want it to go to a New Record.
Thanks
I'm able to open up any of my Forms to a new Record, great! Now I would like to know if/how after I'm finish with one Record in a Form when I hit the 'Refresh" instead of going back to the first Record I want it to go to a New Record.
Thanks
Why are you hitting the 'Refresh' button?
And what 'Refresh" button are you referring to? If it's the native Access Refresh button, the answer is you can't.
But Allan's question is really important...why do you feel the need to do a Refresh at this point in time?
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007
Is this form in Single, Continuous, or Datasheet view?
If the form DataEntry property is set to Yes then the form might 'refresh' to just new record. Question is, will the record just entered be committed to table? Try and let us know.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Single Form.
I have a list box in my form which shows the 'SalesRep' name & how many vehicles they are assigned. After I've completed one form (including the salesrep) when I choose a new form that list box isn't updated unless i press Refresh. So, if 'salesrep' Ross has 10-vehicles, if i assign Ralph another vehicle when i click on a new forrm in the listbox Ralph will still be showing 10-vehicles, unles i click refresh which brings me back to Record 1. I hope this explains....?
Need code behind form to Requery the listbox. Trick is figuring out what event. Maybe the form AfterUpdate (I've never used).
What do you mean by 'choose a new form'? Is this with the Navigation bar or command button code?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Command button code
Then try in the button code, oh wait, maybe the form OnCurrent event:
Me.listboxname.Requery
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
When I clicked yes on the data entry property it only allowed e to view one form at a time -- not exactly what i had in mind.
DataEntry property set to Yes means the form will open to new record only. Then the only records displayed are those entered in that session, until form is closed/reopened or requeried.
Did you try the listbox requery code?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
What is the listbox code?
I tried my best at explaining my reasons for need hit The Refresh Botton after I input data into one Form & go to a new Form, but everyone keeps asking me why do I need to hit the Refresh botton (except you June). I'll restate my reason as I posted yesterday, [I have a list box in my form which shows the 'SalesRep' name & how many vehicles they are assigned. After I've completed one form (including the salesrep) when I choose a new form that list box isn't updated unless i press Refresh. So, if 'salesrep' Ross has 10-vehicles, if i assign Ralph another vehicle when i click on a new forrm in the listbox Ralph will still be showing 10-vehicles, unles i click refresh which brings me back to Record 1. I hope this explains....?]
By 'choose a new form' you mean move to a new record?
In the form OnCurrent event, have code (use the name of your listbox):
Me.listboxname.Requery
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
June,
First, sorry for my delayed response. Second, you (I) may think that you explaining yourself clearly when to others find you quite confusing. Yes, by hitting the Refreash Botton I meant moving to a New Record within the Form; I'm sorry to have confused ppl.
I tried:
Me.SalesRepID.Requery \ it says that Microsoft Access cannot find the object 'Me.' Then it goes on asking about 'Me." as a Macro etc...?
Where did you put that code? My suggestion is for VBA event. Me is a shorthand qualifier for referencing the form or report that code is behind.
If you need to know more about programming in Access:
http://office.microsoft.com/en-us/ac...010341717.aspx
http://www.functionx.com/vbaccess/Lesson01.htm
http://www.simply-access.com/Form-Events.html
In the event on Property Sheet, select [Event Procedure] then double click the ellipses (...) and this will take you to the VBA procedure. Type code.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
June,
I followed your instructions (on the bottom): 'In the event on Property Sheet, select [Event Procedure] then double click the ellipses (...) and this will take you to the VBA procedure. Type code.
Herre's the Code: Me.SalesRepID.Requery
I receiverd a Compile error: Method or Date member not found