Can I use a main form as query criteria

Deonh

Registered User.
Local time
Today, 21:02
Joined
Oct 23, 2012
Messages
26
Hello All

I am working on a warehouse database and i have run into a small problem.
I am using access 2010 and 2007 depending on location.

I have attached a picture of my database relation ship so you can see where i am coming from :)

what i am trying to do is make a main form called products and use that as the sours of the information that my queries look for and then have linked pages to my main form showing the results of that.

example of the above would be as follows
product on main form lets say tennis ball red then on my link forms show
stock plus location and quantity

on another linked form
product on main form and orders for that product and qty

I don't know if it can be done but would be grateful for any help in the matter.
 

Attachments

  • linklayout.png
    linklayout.png
    25.1 KB · Views: 136
Yes, something like this is possible with some basic code. Your question makes it sound as if you want somebody to walk you through the design of your entire front-end. Hopefully this was not your intention.

You seem a little confused about queries or maybe I am not fully understanding what you hope to accomplish. You shouldn't need to use queries to "look" for anything if your tables and forms are set up properly. Queries can be used to create filters.

From what I gather it seems like you just want to create a simple link to other forms that are based on related tables. To do this, you would create your forms and link the PK and FK of your main form and the form(s) you are opening.

So you make one of your controls a link (you can set it to be a hyperlink) and use the OnClick (in design view, open the form properties, click on your control and go to the Events tab>Click). That would then open the other form and navigate to the correct ID.

Code looks something like this:
Code:
DoCmd.OpenForm "YourFormName",,,"[ID]=" & Me.YourControlName

With ID being the field you are linking to in the form you are opening (so the PK or FK depending on your setup). And with Me.ControlName being the related control on the current from (so the PK or FK field that you are linking from).

All in all, you need to break this down into more manageable and more specific questions if you want help.
 
Thank you for your reply in the above from what i can see i might be a bit confuse on the the whole idea of a query and when to use them and for what. currently i am using my queries to make the forms i use to enter my data in .looks like it is back to the drawing board on where i have to use what .

Also my intention was not for some one to hold my hand in how to create it but more than likely to find some one like you to point me in the right direction .i appreciate you time and effort in assisting me and will make sure not to post a question until i have tried every thing in my power to do it by my self.

Also im very sorry for the inconvenience i have caused in asking the question.:(
 
Please don't be sorry for asking the question! I didn't mean for my message didn't come across like that. I apologize if it did :o

I hope I set forth a basic guideline for you in my reply.

If all of your tables are structured properly and your relationships are correct, you should have no problem linking your forms and reports. Once you make your forms and reports, linking them is really quite simple.
 

Users who are viewing this thread

Back
Top Bottom