A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Form Filter



 
 
Thread Tools Display Modes
  #1  
Old October 8th, 2009, 05:44 AM posted to microsoft.public.access.tablesdbdesign
jdguy
external usenet poster
 
Posts: 5
Default Form Filter

I am learning my way around Access & have made a database to utilize data
from an old Lotus Approach database I have used for many years to track my
scale tickets for my farm. It would probably be easier to explain my example
by using more common terms. Let's say I wanted to track the sales of used
cars. I have several models & years on my lot. I would set up a table for
inventory info with the foloowing fields; model year, make, model, color,
etc. Then lets say you have an invoice table with fields; model year, model
(related to the inventory table), and various other fields. How would you
make an invoice input form where you enter the model year & the model field
would be a drop down list that is limited to the models specific to the year
you've just chosen in the first field.? Hope that is enough detail to get me
pointed in the right direction. Thanks in advance for any help.
  #2  
Old October 8th, 2009, 03:20 PM posted to microsoft.public.access.tablesdbdesign
Klatuu
external usenet poster
 
Posts: 7,074
Default Form Filter

Filter the row source query of the combo on the value of the text box where
you enter the year.

SELECT Model FROM tblVehicle WHERE ModelYear = Me.txtModelYear;

Then in the AFter Update event of the Model Year text box requery the combo.

If Not IsNull(Me.txtModelYear) Then
Me.cboModel.Requery
End if
--
Dave Hargis, Microsoft Access MVP


"jdguy" wrote:

I am learning my way around Access & have made a database to utilize data
from an old Lotus Approach database I have used for many years to track my
scale tickets for my farm. It would probably be easier to explain my example
by using more common terms. Let's say I wanted to track the sales of used
cars. I have several models & years on my lot. I would set up a table for
inventory info with the foloowing fields; model year, make, model, color,
etc. Then lets say you have an invoice table with fields; model year, model
(related to the inventory table), and various other fields. How would you
make an invoice input form where you enter the model year & the model field
would be a drop down list that is limited to the models specific to the year
you've just chosen in the first field.? Hope that is enough detail to get me
pointed in the right direction. Thanks in advance for any help.

  #3  
Old October 8th, 2009, 06:40 PM posted to microsoft.public.access.tablesdbdesign
jdguy
external usenet poster
 
Posts: 5
Default Form Filter



"Klatuu" wrote:

Filter the row source query of the combo on the value of the text box where
you enter the year.

SELECT Model FROM tblVehicle WHERE ModelYear = Me.txtModelYear;

Then in the AFter Update event of the Model Year text box requery the combo.

If Not IsNull(Me.txtModelYear) Then
Me.cboModel.Requery
End if
--
Dave Hargis, Microsoft Access MVP


"jdguy" wrote:

I am learning my way around Access & have made a database to utilize data
from an old Lotus Approach database I have used for many years to track my
scale tickets for my farm. It would probably be easier to explain my example
by using more common terms. Let's say I wanted to track the sales of used
cars. I have several models & years on my lot. I would set up a table for
inventory info with the foloowing fields; model year, make, model, color,
etc. Then lets say you have an invoice table with fields; model year, model
(related to the inventory table), and various other fields. How would you
make an invoice input form where you enter the model year & the model field
would be a drop down list that is limited to the models specific to the year
you've just chosen in the first field.? Hope that is enough detail to get me
pointed in the right direction. Thanks in advance for any help.


Thanks for the reply. That is all way over my head at this point, but it
gives some direction & terms to search for. And that's what I was looking
for. I don't know where to enter the commands that you talk about. But I can
get schooled up on it, now that I have a clue about what to do.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.