Tried Me.Requery!
Although it does re-arrange the form into alphabetical order once pressed it also resets the form and causes it to jump to the first record every time the "Save" button is pressed, which I don't want.
Ezzz
User Profile
Collapse
-
Updating the form after "Save" button is pressed
I have dissabled the auto save part of my form and added a save button to prevent inadvertent alterations.
The items on the form are sorted in alphabetical order.
When I add a new item its always at the end.
Is there a way so that when i press the "Save" button the item gets sorted into alphabetical order, like the rest (other that closing the form and re-opening it)?
I have tried the Me.Refresh but to no avail.... -
Well done thats it you've cracked it.
Much appreciated.
Regards
EzzzLeave a comment:
-
Message box Option Buttons
Thanks ADezii
Almost works now, one minor flaw left, when i select the retry button the search does go to the next serial number in line and so on, great.
But when i find the asset i want and press the cancel button the search jumps one asset and displays the next in line not the one i stopped on?
See code below:-
Code:'If matching record found sets focus in SerialNumber and shows msgbox
Leave a comment:
-
Message box Option Buttons
Firstly apologies to the administrator re-the coding tags, hopefully I now understand where I was going wrong.
Secondly ADezi thanks for the responce tried your code but couldn't get it to work.
I have adapted it slightly (see below) and it nearly works!
When it carries out the "DoCmd.FindNext " function the search does indeed find the next serial number but ONLY the...Leave a comment:
-
Message box options buttons
ADezii
I did like your solution and tried to re-code my search formula but got bogged down with too many "If" statements. See below:-
Code:'If matching record found sets focus in SerialNumber and shows msgbox 'and clears search control If SerialNumberRef = Search Then MsgBox "Match Found For: " & Search, , vbRetryCancel, "Congratulations!"
Leave a comment:
-
Message box Option Buttons
I have a search function in my database, see below:-
Code:Private Sub cmdSearch_Click() Dim SerialNumberRef As String Dim Search As String 'Check txtSearch for Null value or Nill Entry first. If IsNull(Me![txtsearch]) Or (Me![txtsearch]) = "" Then MsgBox "Please enter a value!", vbOKOnly, "Invalid Search Criterion!" Me![txtsearch].SetFocus
-
Tried your test with and without the line 19 and it makes no difference. In both case they revert to being sorted by the Product Id and not by the Product Name as I'd like.
I tried removing various parts of the "cmdSearch" and found that its line 17
DoCmd.ShowAllRe cords that is causing the problem? But why I don't know.
The wierd thing is that with line 17 removed the search function still works! and my form remains...Leave a comment:
-
I've looked at line 19 but can't figure out why you think its there?
To be honest though I don't realy understand what most of it does.
Just wondered if anyone else might have any ideas or suggestions.
EzzzLeave a comment:
-
Form Ordering
I have reset the Order By function and this corrects the form so it orders by the Product Name and continues to work fine until I use the search command whereby it reverts to being ordered by the Product Id and then remains that way until you go in to the forms properties and alter and reset the order by function? So it is the cmdSearch that upsets the form but I can't figure out what or why. Any help would be appreciated,...Leave a comment:
-
-
Form Ordering
The cmd search coding behind the button is as below:-
Code:Private Sub cmdSearch_Click() Dim SerialNumberRef As String Dim Search As String 'Check txtSearch for Null value or Nill Entry first. If IsNull(Me![txtsearch]) Or (Me![txtsearch]) = "" Then MsgBox "Please enter a value!", vbOKOnly, "Invalid Search Criterion!"
Leave a comment:
-
How to order form assets by name
Initially all the assets in my form were ordered by the product Id. (Not set by me suspect it is some sort of default after i downloaded the database?)
In order to keep all similar assets together i used the forms "Order By" function in the forms properties box to select "Product Name".
This worked well until i tried to get clever and added a serial number search function using an unbound txt box... -
hedges98
I have ordered the form using [ProductName], via the data tab, as you suggested and it now works a treat. Many thanks for all your help and patience.
Regards
EzzzLeave a comment:
-
My apologies.
I have started to populate the database with various items.
There are about 6 unit 1's with different serial numbers then 6 unit 2's with different serial numbers etc up to unit 5 then 6 RFCU's with different serial numbers and so on. If I populate the database with each item in a random order thats how they appear when scrolling through the database.
What I would like is if say all the unit 1's appeared together...Leave a comment:
-
Thanks my report now works a treat.
One more question if I may as you have a copy of the database.
On the Products form is there a way to group all the like products (like unit 1 etc) together and then display them in serial number order?
Regards
EzzzLeave a comment:
-
-
Reports
When i say created a report i should have said "have a report" that came with the database when i down loaded it.
Hopefully i have attached a zipped copy of the database so you can see it.
I am reluctant to mess with the format cos it works for me, I can just see that later on when there is more on the database the report will be endless so it just made sence to remove all those with zero holdings? Iff...Leave a comment:
-
Database displays products when none in stock
I have created a report that displays a "Product Summery".
The problem is that it displays all products even when there is none in stock.
Is ther a way to get the report to display only the products in stock ie. greater than zero? -
You were spot on.
Have replaced the : with , and the formula now works a treat.
Many thanks.
EzzzLeave a comment:
No activity results to display
Show More
Leave a comment: