Filtering Using A Macro??

Aug 18, 2004

I have a database thats listing stuff by its unit number, I just want to be able to click on the unit number and get taken to the same unit number on a different form. Currently im filtering it on another field thats an autonumber, which is wrong im guessing, as when u delete a record the auto numbers arent matched to the record your want to go to. I am using a macro to open the form and go to record.
I use gotorecord after that and it go's to the record number.

Ideally id like some help on how to get the macro to go to the unit number instead of anything else.

Regards

Asperation

View Replies


ADVERTISEMENT

Modules & VBA :: Write A More Complex Macro That Will Start Another Macro At Preset Time

Dec 8, 2013

I am trying to write a more complex macro that will start another macro at a preset time, however I am getting stopped at the first hurdle - getting a macro to run another macro.

Here is the code i am using at the moment, all I want to do currently is click the first button, then get the second macro to execute. But no luck, getting error 2157 "cannot find the procedure"

Code:
Private Sub Command3_Click()
MsgBox "1st macro running", vbExclamation, "Note"
Application.Run "teststart1"
' Application.OnTime TimeValue("19:55:00"), "teststart1"

[code]....

View 1 Replies View Related

Filtering

Jun 14, 2005

I have a text box (txtInput), is there a way that I can filter results on a form based on txtInput.text?

View 1 Replies View Related

Filtering

Jun 2, 2007

Hey guys im a bit stuck and would really appreciate any suggestions...

I have 3 tables:

Table 1: Products
Product_Name

Table 2: Suppliers
Supplier_Name

Table 3: Prices
Product_Name
Supplier_Name
Supplier_Price

Table 1 & 2 have a relationship to table 3, with a many to many relationship. i.e. many products can have many suppliers.

This part works well and i have a form that shows each product with a subtable that shows that products suppliers.

However, i want to be able to filter to prices table to show each individual supplier and what products they supply.

I appreciate they time anyone took to read this and hope i made it clear, and if any one can help like i siad i would be very gratefully :)

View 1 Replies View Related

Filtering

May 19, 2006

When using the MS Works database the "Find" command makes a new table of all records that include the chosen words.
The "Find" command on Access 2002 does not do this, nor does any filter command. Is there an easy way to do this in Access?

Thanks

View 3 Replies View Related

Help With Filtering

Aug 10, 2005

I want to filter the information displayed on a form using the values I select in text or combo boxes.

I want to filter the form using one or more of the following options.
Call Ref - text box
Location No - Combo box
Area - combo box
Status - combo box

The combo boxes are taking their values from other tables within the database.

Can anyone help me develop the code needed to filter the form.

Thanks

View 4 Replies View Related

Filtering!!

Jun 26, 2006

hello

i have a data sheet form which I need some help with!!
I have a lot of data that I need filtering.

The first filter is for day and the second is for time of day.
I.e. i want to be able to click on a date (using the calender from MS datepicker) and have the datasheet return the records for that selected day.

But I would also like another field that can filter it down to a specific time of day. e.g. 27/06, 13:00 returning all the records for this specific time slot.

At the moment there is a filter for date AND time but I would like date AND/OR time.

Also I would like to have it setup so it automatically gets rid of data over 2 months old, is there a way to do that, if not automatically maybe with a macro/command button??

Thanks for you help

View 1 Replies View Related

Filtering

Jan 14, 2008

i have a form bounded to a table called street.
this form has 2 bounded text boxes:
country: lookup field to the country table
city: luukup field to the city table

i want to do the following: when GetFocus on the city text box, i want to filter in thi stext box for all the cities that belong to this country (value in country text box)
how?

View 5 Replies View Related

Run A Macro On First Use.

Dec 5, 2005

Hi.
I have a macro (that runs a bat file) that I would like to run for the first time ,and only the first time that a form is run. The bat file will then copy over certain files the db needs.
Is this possible?

Thanks.

Frank.

View 1 Replies View Related

Macro

May 19, 2005

I have a database and in order to get the correct values you need to run a few queries/make tables/delete tables ect. I was wondering if there was a way to code something so that on command click button it would run through all the neccessary steps so people dont have to manually do this.

View 1 Replies View Related

Do I Need A Macro For This? If So, How?

Mar 31, 2006

Hi,

Here's a sample of the database that I'm working on. I'm trying to help teachers take attendance of all of their students and so have the following tables.

tblAdmin - List of Teachers and their IDs
tblAttendance - Courses, Student IDs, the Date and the Status (tardy, etc..)
tblCourseInfo - List of Courses and the Teachers teaching the course
tblEnrollment - List of the Courses and the students enrolled in them
tblStudents - Student IDs and their names

The form that I want is a "Course Information Form" that will

(1) Display all the students enrolled in their course
(2) Allow the teachers to take attendance everyday while keeping all the previous records

I've attached my sample database. I really appreciate ANY help any of you can suggest.

Thanks :)

View 13 Replies View Related

Macro

Feb 27, 2006

I am running a Macro that is running 3 query and saving inbetween each query.
My issue is that when the macro runs I have to hit ok when the message boxes pop up saying "its about the run a Query" and then again when it says "your about to update the records". These two messages occur for each query and save. So I have to hit OK 6 times

Is there a way I can set the macro to NOT show these message boxes?

THanks in Advance

View 9 Replies View Related

Form Filtering?

Nov 1, 2005

Hey all I am having a problem with my form filter. I was wondering if you can just direct a filter from form 1 to form 3 without referencing form 2. I am thinking not cause I am having a problem getting the filter to work. Here is the code I have in my load form.

framfiltval = "CONSTR_LOCATION = " + "'" + Form_PID.ADDRESS3.Value + "'"
Form.Filter = framfiltval
Form.FilterOn = True

Thank for the help in advance

View 2 Replies View Related

Question On Filtering??

Jun 20, 2007

Hi

I have this database that list companies and what type of loan they have. I am having a hard time thinking of the right type of filter to use. I am looking to select multiply types of loans and have it filter out the companies that have that service. I was thinking of a list box or options but I am having trouble with the table. My question is how would you go about it? Thanks

View 1 Replies View Related

Filtering, I Guess That's It

Jul 23, 2007

hi
hope someone can help.
I'm making a form to select country/state/city for members
i made a table with 3 columns country,state,city

i wrote down the states for 2 countries (the ones i'm gonna use)
the city is left blank (since i don't want to write down all the cities just yet)

i'm looking to do:

When i try to display the Country as a drop down using a query that selects the column for country, i get a list of the same country the amount of times it is in the table for each state.
I only want to see each country once. even though in the table it is written several times.

View 2 Replies View Related

Filtering Nightmare

Feb 1, 2008

Is there any way that I can import a text file and split the data into three columns without having to go through 65000 lines of text.

It is basically a print off of a directory structure. I have a very large text file that lists the files in folders for each of hundreds of users. I need to divide the information up into three columns so that the below data:

BOBSongs

2003-07-15 12:10 PM 1,474,564 blue.mp3
2003-07-15 12:09 PM 858,204 orange.mp3
2003-07-15 12:10 PM 1,665,028 yellow.mp3

BOBsongshappy

2005-08-23 03:01 PM 917,504 jolly.mp3
2003-07-15 12:09 PM 331,005 joker.mp3

BOBfiles

2005-08-23 03:01 PM 917,504 writing.doc

ends up looking like this:

BOBsongs1,474,564 blue.mp3
BOBsongs858,204 orange.mp3
BOBsongs1,665,028 yellow.mp3
BOBsongshappy 917,504 jolly.mp3
BOBsongshappy 331,005 joker.mp3
BOBfiles917,504 writing.doc

I easily imported the file into Excel, but it is still all in a column. Any advice would be appreciated.

View 5 Replies View Related

Filtering A Form

Feb 19, 2008

Hi all,

I'm creating a database for agents to use at work. Because they will all be using it at the same time, I need to create a combo box on the form that will filter the contents to only show those with their name in them. Is this possible?

Thanks!

View 6 Replies View Related

Filtering In Table

Mar 25, 2008

Hello All,

I am new here and was wondering if anyone has ever had the following happen:

When you 'Filter by Selection' in a table for NULL values the number of records shown are less than the actual number of records with NULL values.
For example, I tried this with a particular tables looking for NULLL records in a particular field and while I could clearly see that the number of NULL values was x, the number returned upon filtering on NULL in that field was less than x.

Any idea? Your help is very much appreciated.
Thanks!

View 6 Replies View Related

Drop Box Filtering

Jan 6, 2006

Hello Everyone. I'm not all that new to access however my problem does exceed my experience and I'm hopeing someone out there maybe able to help me.

A while back I began to build a database to keep track of post production activites such as what items were being produced on a perticular production line. Its my job to book all these items in according to date, line, item, order and qty.

This was all good and simple until it was decided that I had to assign a category to each item. Their are multiple models to one perticular category and to make things even more difficult the same item could be produced on more than one production line.

I work within a Pool company where their are 7 production lines, each with their own purpose and facilites of making certain products until you come to other products that could be produced on any of 3 or more lines.

So, I made a table 'Category' which lists the different types/acronyms for products and the lines in which it could be produced on.
I than created a new column within my Post Production table called 'category' and chose to use a drop box so I may select which category to assign the item. The drop box shows both columns 'Catefory','Line'.

The problem I have is that theres 40+ rows within the Category drop box and because the same name of the category may appear more than once simply beginning to type in the category name isn't good enough.

Is there a way to filter out which categories is listed within the drop box according to which line it maybe coming off once I've already selected which line within the same row?

I've tried selecting a relationship and createing a query both failed.

WarrenG.

View 5 Replies View Related

Filtering A Query...

Jan 4, 2006

i have about 14 fields that relate to subjects, basically i want to be able to run a query that searches for all the people who have choosen the module and report bak who they are..

now i know i can do this 14 times over but is there a way that the user can choose the subject first and the query will then run hence meaning only one query/report.. i thought of using a list/combo box but have absolutely no idea...

im very much a novice but any help would be most apreciated!

cheers

si

View 2 Replies View Related

Filtering Problemo!!!

Jul 5, 2006

So I have a lot of data that sometimes needs filtering by Date, or Date and Time. Is it possible to have a drop down box to display everything for a specific date, and then another combo box to filter even further for specific time slots.

If so how??

Cheers!! :o)

View 1 Replies View Related

Query Filtering

Feb 27, 2007

I have a query filtering question. Please note attach pic for further details. I am trying to put together a search in a form to seach for a certain color or color series from a Qery from two two different sources (from a Combo Box and from a Text Box). I am not sure how to set this up in the query.

Can someone please point me in the right direction?

Thanks,

Kilch

View 2 Replies View Related

Help With Filtering Results

Mar 6, 2007

I've created a database to keep track of all our Microsoft licences for the company.
Just to make sure we're fully licenced, to allocate where needed, and to help reallocate when we replace a pc.

I have 2 tables, 1 hardware (listing PC ID,location etc.) and 1 software (listing software type, software licences, and to which PC ID allocated).

What i'm trying to do is filter the pc's missing either an Office licence or a Windows licence or both, so i can base a report on the results.

I've tried but can't quite get it to work.

Any help would be greatly appreciated.

View 3 Replies View Related

Filtering Letters

Apr 20, 2007

How would I about filtering out all results that contain a letter in them? The entries are in a field called Code, and I only want to display the resources that don't have a letter in the code.

View 1 Replies View Related

Filtering Data

May 14, 2007

Hello i am an engineer working on an access program and i have hit a little snag.
I know i am missing one small little code but i can not seem to figure it out.

I am trying to view everything in one category but one item. It is about 20 different dealers and i want all of them but one. I know if i want to view only one i type "dealer" but what do i type is i want to view all of them but one?:confused:

Thanks Deathwing

View 2 Replies View Related

Filtering A Query

Jan 11, 2008

OK, new problem to solve. I don't know if I am going about this the right way, so please feel free to make suggestions on better ways to acheive an outcome!

I have a query "qryBuildsPrinted" which searches a specific table for appropriate records, feeds these selected records into a report "rptBuildSlips" and prints them.

I am now trying to allow the user to print these build slips selectively, instead of printing out the whole lot pulled in by the query every time. My approach is to use the existing query, but filter the query based upon some selections made by the user in one of my forms. I am having trouble getting the query to filter successfully.

I realise that you can filter both the query and the report independently, so I probably only need to filter the report, but that is not working for me either!

Here is my code:

Private Sub cmdPrint_Build_Slip_Click()
Dim intBikeID As Integer, intBuildID As Integer
Dim varItm As Variant
Dim ctl As Control
Dim intCounter As Integer
Dim intRecords As Integer
Dim varArray() As Long
Dim strFilter As String
Dim blnPrinted As Boolean
Dim msgMessage As Variant

'Print Build Slip for selected bike

'Set Control
Set ctl = Me.lstResults
intRecords = 0
intCounter = 0

'check if a selection has been made (kinda dodgy)
For Each varItm In ctl.ItemsSelected
GoTo Selection_Made
Next

GoTo CleanUp

Selection_Made:
'Count how many records have been selected
For Each varItm In ctl.ItemsSelected
intRecords = intRecords + 1
Next

'Clear Array and Re-allocate Upper Bound of array (Array starts at 0)
ReDim varArray(intRecords - 1)

For Each varItm In ctl.ItemsSelected

'determine BuildID of selected record
intBikeID = ctl.ItemData(varItm)
intBuildID = DLookup("[BuildID]", "tblBuilds", "[BikeID] = " & intBikeID)
blnPrinted = DLookup("[PrintedSlip]", "tblBuilds", "[BikeID] = " & intBikeID)
If (blnPrinted = True) Then
msgMessage = MsgBox("One of the bikes selected has already had a Build Slip printed. Please adjust your selection", vbOKOnly, "Build Slip Already Printed")
GoTo CleanUp
End If

'Fill array with values, given how many values are present
varArray(intCounter) = intBuildID

'Adjust counter to go to next array value
intCounter = intCounter + 1

Next

'Select Filter String
Select Case intRecords
Case 1
strFilter = "[BuildID] = " & varArray(0)
Case 2
strFilter = "[BuildID] = " & varArray(0) & " Or " & varArray(1)
End Select


'Open query which displays the bike selected
DoCmd.OpenQuery ("qryBuildsPrinted")
'DoCmd.ApplyFilter , strFilter

'Print report of query with filter applied
DoCmd.OpenReport "rptBuildSlips", , , strFilter

'Close query, remove filter
DoCmd.SetWarnings False
DoCmd.Close acQuery, "qryBuildsPrinted"
DoCmd.SetWarnings True

ctl.Requery

GoTo CleanUp

CleanUp:
intBikeID = Empty
intBuildID = Empty
Set varItm = Nothing
ctl.Value = Empty
Set ctl = Nothing
intCounter = Empty
intRecords = Empty
strFilter = Empty
blnPrinted = False


End Sub

A further question that is probably on the same topic is that once this has been completed, I also need to modify my existing Update Query which makes a modification to the data in the table. Is it possible to apply a filter to an Update query also?

I realise this may not be the most effective use of Access, so as I said, please feel free to suggest alternate methods I can research.

Regards,
Jon

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved