473,407 Members | 2,306 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,407 software developers and data experts.

Multiple forms linked to one data Table

13
Hello everyone!! I'm a newbie here so please no big words. :-) This is my first time building a database, but I feel like I am learning and making progress. Here is my problem:

The database I'm building is strictly for retrevial of data, not updating (for now). I have one data table that contains information on 14 different customers (businesses), and I also only created one query for a report. I created a switchboard that has a button linked to 14 different forms I created for each customer. The reason I did that was because I wanted the customer's logo to appear when their button is pressed, so I thought that was the easiest way (I was able to setup each form with a picture of each customer's logo). Each form is basically set up identical to each other as to retreive the same types of information. I am able to set up my 1st customer to get the report I want, using this expression ( [Forms]![AIR PACIFIC]![cboAirline] )in the criteria spot in the customer field of the query. I also use this expression ( Between[Form]![AIR PACIFIC]![txtStartDate] And [Form]![AIR PACIFIC]![txtEndDate] ) in the Request Date criteria field of the same query. However, when I go to setup my 2nd customer, I'm not able to. Before I waste my time even further, is it even possible to do what I am trying to do? Any help anyone provides will be greatly appreciated. Thanks in advance!!
Jun 17 '13 #1

✓ answered by Seth Schrock

Just put an Image control on the form and then set its control source to the field that has the picture.

19 6682
Rabbit
12,516 Expert Mod 8TB
You should only use one form with the location of the logo stored in the table and the image on the form linked to that location.
Jun 17 '13 #2
Seth Schrock
2,965 Expert 2GB
You don't really say exactly what you are trying to do, only what you have tried. However, here are a few tips:
1) Read Database Normalization and Table Structures. This is something everyone who designs databases should know and follow.
2) In the table that stores your customer information, include a field for the logo. That way, you have one form that works for all of your customers. Otherwise, you will have to do a lot of work to add another customer.
Jun 17 '13 #3
antjonz
13
Seth...

Thanks for the reply and the info. I am trying to create a database that the people in my office can use to pull data for a specific customer. I'm trying to link all 14 forms to the one data table and one query. I was trying to use a "BETWEEN" function in the query (Between[Form]![AIR PACIFIC]![txtStartDate] And [Form]![SUN COUNTRY]![txtEndDate]), so regardless of which form is being used, it will pull the information for that customer only, but I guess the "BETWEEN" function doesn't work.
Jun 17 '13 #4
Rabbit
12,516 Expert Mod 8TB
What we're trying to say is that your design is flawed and you should have only one form. You can still achieve "customized" forms (i.e. your different logos) merely be using one form and linking the picture to a location stored in the table.
Jun 17 '13 #5
Seth Schrock
2,965 Expert 2GB
The between function does work. Did you change the form name for each form?

You really should change your design to have all of the customers on one form. You will save yourself all kinds of headaches.
Jun 17 '13 #6
antjonz
13
Rabbit...yes, I understood what you were saying about the logos in the table. So it doesn't matter if my table is an excel file I imported into access?
Jun 17 '13 #7
antjonz
13
Seth...I did change the form name on each form. I guess I will go back to the drawing board on my design. lol. So I'll be able to use the "between" function in the query if I use it on just one form? Will a switchboard be necessary?
Jun 17 '13 #8
Rabbit
12,516 Expert Mod 8TB
@anton, it doesn't matter, you just need to store the location of the image file somewhere. That way you don't need 14 forms and 14 different between clauses.
Jun 18 '13 #9
antjonz
13
Thanks again Rabbit...would it be an OLE object,hyperlink, or an Attachment? Also, is there a way to copy and paste into multiple fields? For example, my first customer has 335 rows of data in the data table. In the new field I created, I will have to format each of the 335 new fields into the one that will have the logo, but I don't see a way that I can copy and paste like in excel. All I can do is copy and paste one at a time. After I update all the fields with the customer's logos, how do I set it up so that the logo show up on the form?
Jun 18 '13 #10
Seth Schrock
2,965 Expert 2GB
Here is where you need to make sure that your database is normalized (see the link in post #3). You should have a customers table that would be related to your current table with all of its information. The logo would then be put in the customers table. That way, the customer information is only entered once.

Personally, I choose the Attachment file type for pictures as long as I don't have to be compatible with Access 2003 or earlier.
Jun 18 '13 #11
antjonz
13
Ok Seth, I created the 2nd table with each customer's name and attached the logo in the adjacent field. I also "related" both customer fields in the tables. Now...how do I get the logo to show up? I have a combo box on the main form that will drop down and show each customer that I can select(I will delete the other 13 forms). So how do I get the selected customer's logo to appear on the main form?
Jun 18 '13 #12
Seth Schrock
2,965 Expert 2GB
Just put an Image control on the form and then set its control source to the field that has the picture.
Jun 18 '13 #13
antjonz
13
Seth, I'm beginning to feel really stupid because I do not see an "image control" option. I'm looking at the "Controls" section in the "Form Design" tools and do not see it. I see bound/unbound object frame, text box, label, image and various other buttons.
Jun 18 '13 #14
Seth Schrock
2,965 Expert 2GB
What version of Access are you using? I'm looking at Access 2010, and I thought that 2007 had it as well.
Jun 18 '13 #15
antjonz
13
I am using Access 2007.
Jun 18 '13 #16
Rabbit
12,516 Expert Mod 8TB
2007 does have an image control. It looks like a mountain with a sun in the upper right.
Jun 18 '13 #17
antjonz
13
Sorry it took me a while to respond. I do see that now. I placed the image (control) on the form in design view, and set the control source to the field that has the image attachment. However it still didn't work. I will try to mess with it tonight to see if I can figure out what I did wrong.
Jun 19 '13 #18
zmbd
5,501 Expert Mod 4TB
We currently have two active threads that really amount to the same question:
“How Do I get an image in/on-to my form/report”
So for a little background and one method:
Use images in your Access forms, reports, and controls (v2003) I think it is very important that there is an understanding of the fundamental methods of storage methods in the older MDB files as there is some carry over into the V2007/2010 formats (maybe 2013 too; however, I know very little about that version).
Provided in this link is also a link for a video for V2010 Video: Add, reuse, and update images on forms and reports
Finally, the way I’ve done this for years is to create a custom function and use it as the “picture” value for a “linked” image. The function refers to another control on the form for the file name and then works out the relative path via the currentproject.path value. Perhaps I may post an example database using my function.
However, shortly after I had figured out how to do this on my own I came across the following information that does something similar in that it uses a custom function; however, still much different in the final implementation: How to display images from a folder in a form, a report, or a data access page Article ID: 285820 (v2003) where in the events are used for updating the images, whereas my does not use any events.

If there's enough interest, I might create that generic db using my people template and some clipart... wont take me but a moment or two as the rest of the code is already in production.
Jun 19 '13 #19
antjonz
13
Zmbd, Rabbit and Seth,

Thanks for all of your help. I appreciate you guys taking the time in helping me. Unfortunately I still cannot get the pictures to open when I select a customer from the dropdown on my main form. I've attached a .jpg of my customer Table and my main form in Report view and Design view(image control property is displayed). I don't know if that will help any, but maybe you guys can see something I dont.



Attached Images
File Type: jpg customertbl.jpg (85.9 KB, 2838 views)
File Type: jpg mainform.jpg (26.9 KB, 2800 views)
File Type: jpg mainformdview.jpg (72.3 KB, 2864 views)
Jun 20 '13 #20

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

Similar topics

1
by: Chris Beach | last post by:
Hi, I have a JSP page with several forms on it. Some of these forms are generated dynamically, and each of them submits some information to a database. Handling one form is easy, as I can...
1
by: Sam Berry | last post by:
I am in need of some guidance on asscessing the same data from multiple forms. I tried using a collection, but everytime that I try to access the collection, I have to use the new word. colStuff...
8
by: TJS | last post by:
what are folks doing to get around limitation of one server form per page ?
10
by: SHPsalm139 | last post by:
We have an Access 2K application that uses multiple forms. We currently hardcode the release number in a label on each form but this gets tedious to do each time there's a new release. I thought...
7
by: Jeff | last post by:
I plan to write a Windows Forms MDI application for a medical office. Users must be able to select a patient and view related information on multiple forms; with1-4 forms opened at the same time...
0
by: question | last post by:
Hi! I have a requirement where I need to display multiple forms one after the other like a slide show. These are in the same application. Basicall on selection of a menu item it should start...
5
by: c676228 | last post by:
Hi everyone, my colleagues are thinking about have three insurance plans on one asp page: I simplify the plan as follow: text box:number of people plan1 plan2 plan3
4
by: robertmeyer1 | last post by:
Hey, I have about 5 tables, and each table has a corresponding form. The 1st table (A) is a client data table (client information) with a ClientID (PK). This clientId is a (FK) in all 4 other...
5
by: dancole42 | last post by:
I want to create a button that will print multiple forms. Each form is a list of various orders, and there are three separate forms: -Standard Orders -Rush Orders -VIP Rush Orders Each is...
1
by: Will | last post by:
Hi, This is might be a basic question, but is it possible to hold multiple pieces of data in one field? I am adpating a database which compares multiple projects against a number of criteria....
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.