I have [Product] in Orders Table and Orders Form as Combo Box for showing Product from Products Table.
And within product field on Orders, I want to make 'Active' product only showing up when choosing from combo box.
I made some records to test in Orders Form. Then I filtered Product from Orders Form with query:
Code:
SELECT Products.ID, Products.Product, Products.Active
FROM Products
WHERE (((Products.Active) Like Yes));
Then I changed some product 'Active' to "No"
And the old record disappearing.
How to make older record not disappearing when I filter some of field not being available to choose (because Active product uncheck)
My table occasionally gets a second record added for the same person. What is the easiest way to update the new record with the non-zero fields from the older record, then delete the older record? There is a unique id field as well as a timestamp, so knowing which is older isn't a problem. Is there an easy way to do this?
In my Access adp, when I open a certain form (frmVertebrates), the databinding occurs in the Load event for the form, for various reasons. I have not specified any datasource in the form's design view.
Databinding for frmVertebrates:
Code: Me.Form.RecordSource = "select * from dbo.vertebrates where catalogID=3"
This works great when just opening the form. However, when opening with a filter from a button on another form it won't work, the form displays all records.
Button code:
DoCmd.OpenForm frmVertebrates, , , "vertID=123"
Obviously, this makes sense, since the record source is explicitly set in the Load event.
Is there a way to capture the filter "vertID=123" so it can be added to the Form.RecordSource sql?
When breaking in the Load-code and watching the 'form' variable, I can't spot the filter condition anywhere...
I have a form which displays records based on a selection from a list box on the form.
The default record displayed when I load the form is record 1 from the table, this is not an issue when I initially load the form but I also have options to filter the records displayed in the list box using various SQL statements, depending on the options selected.
However, when I apply one ofthese filters to the list box the default record displayed on the form still defaults to the first record in the table, which may not be included in the filtered list box.
Is there a way I can default to the first record listed in the list box rather than the first record in the table.
I'm constructing a database to record appointments. I want my users to input their appointments on one half of a form (I can manage that bit) but on the other half I want them to be able to see a list of the appointments they already have booked that day (with any patient) or what the patients already have booked that day (with themselves and any other therapists).
The appointment fields they will need to see are:
start time end time patient/therapist (depending on if they are viewing their own or the chosen patients' appointments type of appointment (physiotherapy etc) location
The date won't need to be seen but will dictate which day's appointments are listed.
At it's simplest I could get away with a list of the day's appointments for the patient and date the therapist has typed into the form to start the record.
Ideally I'd like them to be able to choose whether to see a list of the patient's appointments for that day or their own. If there's room I would display both.
Here's the final, 'moon-on-a-stick' bit... it would be great if I could show the appointments in time slots rather than just as a list. From what I can tell that's quite tricky to pull off but i thought I would ask anyway...
At the moment I don't even know what keywords to look up - is this 'embedding a report in a form' or 'inserting a filtered list' and so on.
Hi, we have a database for keeping record of our games (unreal tournament games).... Its just a simple database and we enter our results based on the following fields: -
Opponent: Game Type: Players: Maps: Date: Result:
the file has started to get quite big and wondered if it would be possible to automatically move entries say that were older than a month old to a new table, or archive table. Im not a big access genious so i hope i have explained enough for you to understand what im trying to do here.
Im not sure this belongs under FOrm but most likely.The thing is I have 5 tables and 5 forms each table connected to each form.My problem is when I enter data into the form and then it saves into the table.The next time I open my program and I enter another information into the form it goes into the table but it goes over the older one I entered..SO my problem is I can only save one record into the table because it overwrites the older one. Thanx
Firstly I rather unsucessfly tried the search function,
I want to automatically delete any enteries older than 6 months, I do NOT want to archieve them, simply delete them. I only have three entries; Date Address Line 1 Post Code
I was unsure how i would go about this or even where to begin so some help would be much appreciated.
I need to find the LATEST date in field Recdate that is 45 days or older in a query. I have tried <Date()-45, etc. but it returns all dates not just the last one. Does this require a range of dates to do this ? If not, how would I id the last date input ? Thanks
My form has a piece of code in it that deletes records older than two years :
Code: Dim dteExpiry As Date Dim strSQLDelete As String dteExpiry = DateAdd("yyyy", -2, Date) strSQLDelete = "DELETE from tblWaarschuwingen WHERE tblWaarschuwingen.datum2 <= #" & dteExpiry & "#;" DoCmd.RunSQL strSQLDelete But...
As it turns out it does not only delete records older then two years, but also records related with personnel number to that record !!
Now i do relate records by personnel number (its NOT the primairy key though) but in this case its not meant to do that !
How to build a query in Access 2010/13 that will not display any records that are older than 3 hours? See below for more specifics.
The criteria would be based on a field that houses the time (End Time) and also a field that houses a number (Status). So, only if the field in the record says 3 (based on the Status field) then it should not display the record after 3 hours (based on the End Time field) of being changed to a 3. Is it possible to do that?
I have attached a screenshot of what I am referring to.
I've built an an update query that updates a Yes/No field "Expired?" to "Yes" if the expiration date has passed i.e. if the current date is newer than the expiration date. I thought this would translate into the current date being greater than the expiration date?
UPDATE Alert SET Alert.[Expired?] = 'Yes' WHERE Alert.Current_Date>Alert.Expiration_Date;
When I run this, it identifies the records to be updated, but then stops updating the fields due to "a conversion failure."
So I have a report generated, listing all my companies personnel in one column and the next column has the expiration dates of a certian training certificate. My question i would like to add some statistics to the bottom of the report, mainly how many certificates are expired, which is the ones over a year.
I have attempted to use:
=Sum(IIf([AT_LEVEL 1]<"Now()-365",1,0))
previously in excel my spreadsheet counted it like this:
I have read a couple of other queries about this problem, but none seem to help me. I have a database, not too large (c.2000 records), not too complicated (very few macros, no referential integrity, no reports or subforms, mainly simple queries). Over the past few weeks records have started disappearing. Vanishing, no trace. No pattern to the record numbers. About 220 in all have disappeared so far. There is a main table (manuscripts), with links to other tables (manuscript notes, manuscript decisions). The records disappear from the manuscripts table, but the related records are left in the other tables. Only five people use the database, no one has deliberately deleted anything in fact as we keep all information.
Could this be a virus? I cannot believe that the database is too large.
I am in a dilly of a pickle here: after i set up my form all nice nice, with cascading combo boxes, other random combo boxes, a search button, setting up the SQL, etc. I was so proud- thinking i've finally done it! :) But then... as I reloaded the access form afterwards it only displayed in design views and SQL views, and not the other view. :eek: :confused: So, this being my first ever database, I have no idea what the problem is. I have checked the properties box, and it is not a problem with the settings -not - being on display always, nor with the other property settings. (I believe)
Any advice/input would be greatly appreciated into this matter :) Thanks a million in advance!
I have a combo box on a form, this combo box by the use of a select query shows all the relevant values in the drop down box from a table:mad.
My major problem appears to be that records that are selected in the combo box by way of the slect query seem to be disappearing from the table or part of the record is lost.
I have a large database with about 200 queries. I am having a problem with the last few I added. I run them from VB. When I run them the SQL statement disappears, sometimes. If I go to the SQL View instead of the Design veiw all that is left is Select;. I the Design View there is nothing.
I have a form that has a memo field. If text in the memo field is highlighted and I press the enter key the text is deleted.
Does anyone know how to prevent this from happening?
I know it is easy enough to click off the text (deselect it) so that pressing the enter key will move me to the next field (as required) but I don't always remember to do this and Hey Presto I've lost my text and have to start again.
But why highlight the text in the first place I hear you say. Well I have just pasted it in from a different application and it comes in highlighted.
I created a new DB and there are times when I open my form that all of my entry fields have disappeared along with their captions. Sometimes I am able to advance through different records and get the fields to reappear, otherwise I have to close the form and reopen it. What causes this and is there something I can do to prevent it?
I have a form with an unbound subform that was working quite nicely. The only change I made was changing the data source for the main form from a query to a static table; name of table same as the prior query. Now the subform appears but the data doesn't. The buttons in the subform header are visible and work but the detail is not visible when displayed as a subform, it is fine if I open the subform as a separate form, I see the correct records based on the main form's criteria.
I have searched for some property I may have accidentally changed but can't find anything. It isn't set in data entry mode, not even a blank line shows.