473,320 Members | 1,859 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,320 software developers and data experts.

main form with subform textbox

80
Ok, heres the problem I have a main form with a subform. I want to have a text field that displays a field from the table my subform is based on. I tried just putting it there, but then the sub form is messed up. I would assume theres a way to do this with SQL, but im not sure, any ideas appreciated.

Thanks in advance
Aug 8 '07 #1
7 1375
mlcampeau
296 Expert 100+
Ok, heres the problem I have a main form with a subform. I want to have a text field that displays a field from the table my subform is based on. I tried just putting it there, but then the sub form is messed up. I would assume theres a way to do this with SQL, but im not sure, any ideas appreciated.

Thanks in advance
Scotter is this the same form/subform as discussed in this link? http://www.thescripts.com/forum/thread689844.html
Aug 8 '07 #2
Scotter
80
yesssssssssssss it is
Aug 8 '07 #3
mlcampeau
296 Expert 100+
yesssssssssssss it is
which field are you trying to display, and are you trying to display it on your main or subform?
Aug 8 '07 #4
Scotter
80
Ok, what I did was I added a new field (customer number) into the subfield table. I was trying to be able to search by it, but realized I could just use the one that was a foreign key in another table. But I was trying to it on my main form.

But just out of curiosity is there a way to do that? Like have an unbound text field that takes any data put into it and inputs it into a field?
Aug 8 '07 #5
mlcampeau
296 Expert 100+
Ok, what I did was I added a new field (customer number) into the subfield table. I was trying to be able to search by it, but realized I could just use the one that was a foreign key in another table. But I was trying to it on my main form.

But just out of curiosity is there a way to do that? Like have an unbound text field that takes any data put into it and inputs it into a field?
Okay you lost me. This is the table structure you defined in the Auto Number Not Linking thread:
Expand|Select|Wrap|Line Numbers
  1. Customer table              Order Info table         Order table  
  2. |Customer ID*|-------------|Customer ID    |    /--|Order Number|
  3. |Name        |             |Order Number*  |---/   |Item        |
  4. |Phone       |             |Payment Method |       |Quantity    |
  5. |etc...      |             |ect...         |       |etc...      |
  6.  
  7.  
  8. where both *'s are primary keys, and auto numbers
Try explaining exactly what you're trying to do using the actual field names and table names (if this structure is irrelevant, please include the tables/queries that are). It's just easier to understand when you include all the info.
Are you saying that you added CustomerID to the Order Table?
And your question was whether or not a user can type something in, click a search button, and have the form pull up that information? (Not sure if I interpreted that right or not)
Aug 8 '07 #6
Scotter
80
Yeah thats pretty much what I was after. But for some reason I was wanting to add a customer id field to the order table so I could search by it. But then realized that thats kinda stupid and I started using the customer id from the order info table(im still workin on understanding table relationships). So now everything is working good.
Aug 9 '07 #7
mlcampeau
296 Expert 100+
Yeah thats pretty much what I was after. But for some reason I was wanting to add a customer id field to the order table so I could search by it. But then realized that thats kinda stupid and I started using the customer id from the order info table(im still workin on understanding table relationships). So now everything is working good.
I'm glad you got it worked out! And you're right, customer id should not be added to the order table. The relationships are kind of hard to get to used to if you're just learning them. Good luck with the rest of your database!
Aug 9 '07 #8

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

Similar topics

1
by: Hasanain F. Esmail | last post by:
Hi All, I am using A2 for this database. I have a main form with bound fields of FlightNumber and FlightDate I also have a subform. This subform takes details of a passanger along with other...
0
by: Ellen Manning | last post by:
I've got an A2K form with a subform based on a query. This query has a checkbox and an amount field and returns records if checkbox is checked. I Dsum the amount field and display on the main...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
17
by: Neil Ginsberg | last post by:
OK, this is a stupid thing, but I can't seem to get this to work. I have a form with a subform (in continuous form view). A combo box on the main form has code in the AfterUpdate event which adds a...
30
by: Shannan Casteel via AccessMonster.com | last post by:
I have a subform named "sbfrmParts" with a list of parts along with the quantity and price. I have used a text box in the subform's footer and set the control source to "=Sum(*)". I set the...
0
by: keri | last post by:
Hi again, After puzzling all day I have (sort of) figured a round about way to solve my problems. I have a form callsmade with a subform allaccounts On clicking on a record in the subform I...
1
by: tomlebold | last post by:
Having problems displaying query results from combo boxes on a sub form, which is on the same form that is used to select criteria. This has always worked form me when displaying query results on...
3
by: virtualgreek | last post by:
Dear all, I have a scenario that is driving me nuts. (MS Access 2003) I have a form/subform (Continuous form) where it gets its data from tables Order and Order_Details. In the footer...
4
theaybaras
by: theaybaras | last post by:
Hi everyone, You've all been such a huge help to me since joining, and I'd just like to take a second to let you know how much I appreciate it! That said, I have another supplication! ;) I have...
16
by: mlcampeau | last post by:
I'm fairly new to this so I'll try to be as clear as possible. I have a database that stores employee information and all job titles available. I have a main form that is based from a query and...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.