473,403 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Filtering records in a Form

121 100+
I have three related questions for an update form I'm building and hope someone can help:

I have a table called [Master] and I want people to be able to review those records and if they need to update them. I have made a form for viewing the records.

1) The first question is how do I make a drop-down menu of the [Rec_ID] (the primary key for the table) for them to choose what to enter. Is there a way to put other filters in drop downs (i.e. by [Owner], [Date] etc.)


2) The second question is I want ot put a button so that when they are done entering the updates in the form, the record they are working on gets saved to the [Input_TBL] to be processed again with the new updates. I had one idea of how to do this:
  • Create an append query from [Master] to [Input_TBL]
  • Use criteria on [Rec_ID] of dlookup([Rec-ID], [Forms]![Master_FRM])
  • Put a button on the form that runs this query.
I don't know if this will work or if there is a potential problem with this setup


3) The last question, is I want them to be able to see the full table so they can lookup the [Rec_ID] they are going to need to change. But I don't wnat them to be able to actually change the records. Is there a way to do this?


Thanks in advance for any help.
Apr 13 '07 #1
10 1596
JHNielson
121 100+
I hate to have to bump this, but I am really having some trouble trying to resolve this from issue. Again thanks to anyone who can help.
Apr 15 '07 #2
JHNielson
121 100+
I tried to setup the query using an append query. and I set the criteria for the [REC_ID] to:


DLookUp([REC_ID],[Forms]![Review Master Records])


and I get a "Data type mismatch in criteria expression" error. Even though both records are set to Text.


When I set this to (which is what I thought the expression should be):
DLookUp("[REC_ID]","[Forms]![Review Master Records]")

I get an "Unknown" error.


I don't know why this query isn't working.


Any help would be greatly appreciated.
Apr 16 '07 #3
JHNielson
121 100+
To resolve the filtering on the form by teh Drop-Down box, I tried assigning the Record Source to:

Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM MAST_REC_LOG WHERE REC_ID=Forms![Copy of Review Master Records]!REC_ID; 
But the form doesn't update.


Thanks again for any help anyone can give
Apr 16 '07 #4
dont know if this could help you,,,
on form design, insert a combo box on your header, a wizard will appear giving you 3 choices (lookup wizard i guess), choose 3rd choice which gives you the table record source, select the primary key and the value you wanted the user to select..
the selected record on the combo box will display all the record related to the field..hope i was able to help you
Apr 16 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
I have three related questions for an update form I'm building and hope someone can help:

I have a table called [Master] and I want people to be able to review those records and if they need to update them. I have made a form for viewing the records.

1) The first question is how do I make a drop-down menu of the [Rec_ID] (the primary key for the table) for them to choose what to enter. Is there a way to put other filters in drop downs (i.e. by [Owner], [Date] etc.)
The Row Source of a dropdown list can be based on any query you choose.

2) The second question is I want ot put a button so that when they are done entering the updates in the form, the record they are working on gets saved to the [Input_TBL] to be processed again with the new updates. I had one idea of how to do this:
  • Create an append query from [Master] to [Input_TBL]
  • Use criteria on [Rec_ID] of dlookup([Rec-ID], [Forms]![Master_FRM])
  • Put a button on the form that runs this query.
I don't know if this will work or if there is a potential problem with this setup

You don't need a DLookup just set the criteria as [Forms]![Master_FRM]![Rec-ID]

3) The last question, is I want them to be able to see the full table so they can lookup the [Rec_ID] they are going to need to change. But I don't wnat them to be able to actually change the records. Is there a way to do this?


Thanks in advance for any help.


Create a form of all the records. Set the Allow Additions, Allow Deletions and Allow Edits properties to no. Make this form a subform of the main form.

Mary
Apr 16 '07 #6
JHNielson
121 100+
Thanks for all the help. The one problem I am having is that I have done both:

Setting the record source to the select query i mentioned above,
I have also set the record source to a query on the [Master Table], with the critreria set to [Forms]![Master Records]![REC_ID]


and neither of them update the records.


I'm not sure how to fix this

Also I want the users to be able to update the records that is pulls up, so I need to know the best way to create/design this form.
Apr 16 '07 #7
MMcCarthy
14,534 Expert Mod 8TB
Thanks for all the help. The one problem I am having is that I have done both:

Setting the record source to the select query i mentioned above,
I have also set the record source to a query on the [Master Table], with the critreria set to [Forms]![Master Records]![REC_ID]


and neither of them update the records.


I'm not sure how to fix this

Also I want the users to be able to update the records that is pulls up, so I need to know the best way to create/design this form.
Add the line Me.Requery to your code.
Apr 16 '07 #8
JHNielson
121 100+
Great! I got it to work.

Thanks everyone!
Apr 16 '07 #9
MMcCarthy
14,534 Expert Mod 8TB
Great! I got it to work.

Thanks everyone!
You're welcome.
Apr 16 '07 #10
NeoPa
32,556 Expert Mod 16PB
I hate to have to bump this, but I am really having some trouble trying to resolve this from issue. Again thanks to anyone who can help.
JH,
You're absolutely fine bumping after 24 hours (Yours was even longer so no probs at all). We don't have many threads that don't get any answer at all for that long.
You seem to be all sorted now, which is good, but there is a tutorial thread (Example Filtering on a Form.) which you may find interesting anyway.
Apr 18 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I...
2
by: Luther | last post by:
I want to create a form that searches a table. The hard part is this, I'd like to have the available records filtered based on combobox selections. For example, if this were a vehicle database, I...
5
by: Richard | last post by:
Hi, I have a form that take some time to load due to many comboboxes and at least 8 subforms. When I filter or sort the main form I get an error message and then Access shuts down. They ask if...
19
by: William Wisnieski | last post by:
Hello Everyone, I have a main form with a datasheet subform that I use to query by form. After the user selects two criteria on the main form and clicks the cmdShowResults button on the main...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
1
by: MLH | last post by:
I have a form (xxxxxxxxxxxxxx) with a combo-box control (yyyyyyyyyyyyyy). The rowsource property for that combo box is as follows: SELECT DISTINCTROW ., . FROM ; The SQL for qryVehicleList...
4
by: Dave | last post by:
I am having difficulty filtering a form as the user types in a onchange event here is my code strFilter = cboCriteria.Value & " LIKE '" & Me!txtCriteria.text & "*" & "'" If Len(strFilter ) 0...
3
by: paquer | last post by:
On my Main form I have a Command Button that opens a Subform in order to create a new Subform record. At this point I want the subform to show only the new record being created. Not all the...
2
Scott Price
by: Scott Price | last post by:
Hello again! Running MS Access 2003 on WinXPproSP2. Now I'm trying to re-filter my subform based on the currently shown Year field (the filter applied on open restricts to 15 records relating...
0
by: Lyn | last post by:
I have a problem using the form .Filter and .FilterOn properties which causes Access to crash (as detailed in a separate post). The form operates in continuous mode, displaying matching records...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.