473,791 Members | 3,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

tricky form

hello, I'm trying to code a form that will output all data on from one
table into separate pages (can scroll through them using the arrows, or
entering a specific entry at the bottom), but on each page it will look
at the primary key for that table, then look at another table, and
wherever it contains a reference to that particular value, create a
textbox and output a memo onto...

since that was probably vague and confusing i will try to explain it
again with examples... I have a table called "Hazard table", it has
fields for "JSA Number", "Job Component Number", "Hazard Number"
<--(primary key), and "Hazard Description". I have another table called
"Control Measure Table", it has fields for "JSA Number", "Job Component
Number", "Hazard Number" <--(refers to "Hazard number" in "Hazard
table"), "Control Measure Number" <--(primary key), and "Control
Measure Description".

now what I want the form to do, is for each "Hazard Number" in "Hazard
Table" output the description for it, and output any description from
the "Control Measure table" that has a matching "Hazard Number"... I
would like it to display such that it creates a TextBox and displays
the descriptions for each hazard description (with a button at the
bottom to create a new hazard) so that the data can be edited, and then
create TextBoxes to the right of the hazard description, one for each
control desciption (again, with a button at the bottom to create a new
control measure)

the primary keys for both tables are set up as autonumbers, and the
hazard number in the control measure table is supposed to be given the
value of the hazard number its being created with...

currently my chief trouble is figuring out how to access the two tables
and use the relation between the two within the form itself... then i
still havent quite figured out how to have it create the textboxes it
needs as its goes (i dont want to have a bunch of textboxes not visible
or anything like that)... I'm not that good with VB, your help would
be appreciated... thanks in advance, and sorry that my post is long and
a bit hard to read

Jul 12 '06 #1
7 1305
ok, so here is a revised request, since my last was rather... confusing
to say the least...

I am creating a form that will show data from one table, one entry per
page, and on each page it also needs to show data related to that entry
from another table... the data needs to be output into textboxes so
that it can be edited. the number of entries from the related table
associated with the entry from the main table vary, and each entry
needs to be output into a separate textbox. how would i code this so it
would go through a for each loop that looks at all entries in the
second table and, for each entry that has a matching link to main
table, create a textbox and insert the data from the table into it...
at the bottom of the page.

I am also uncertain how to code a button that will adjust the position
of itself and create a new textbox where it had been (whatever data
gets entered into it then needs to be added to the table... im not
certain if some of the fields being autonumbers complicate or simplify
the matter)

I know this is still probably difficult to read and understand, please
ask me questions to clarify and i try to as best as i can

Jul 13 '06 #2
wr***********@g mail.com wrote in
news:11******** **************@ m73g2000cwd.goo glegroups.com:
ok, so here is a revised request, since my last was rather...
confusing to say the least...

I am creating a form that will show data from one table, one
entry per page, and on each page it also needs to show data
related to that entry from another table... the data needs to
be output into textboxes so that it can be edited. the number
of entries from the related table associated with the entry
from the main table vary, and each entry needs to be output
into a separate textbox. how would i code this so it would go
through a for each loop that looks at all entries in the
second table and, for each entry that has a matching link to
main table, create a textbox and insert the data from the
table into it... at the bottom of the page.

I am also uncertain how to code a button that will adjust the
position of itself and create a new textbox where it had been
(whatever data gets entered into it then needs to be added to
the table... im not certain if some of the fields being
autonumbers complicate or simplify the matter)

I know this is still probably difficult to read and
understand, please ask me questions to clarify and i try to as
best as i can

It sounds like you are trying to reinvent the wheel.

Instead of putting the textboxes directly on the form, create a
subform which contains the textbox.
--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jul 13 '06 #3
the problem is that there is an undetermined amount of textboxes... the
main form will have a number of textboxes, and each of those textboxes
would have a subform which contain a number of textboxes... the number
of textboxes in the main form depends on which record the form as a
whole is looking at, and the number of textboxes in the subform would
depend on which textbox it was associated with... it all varies... i
know i could just manually create all these textboxes, and only make
them visible if there is information to populate them with... but there
could be as many as 10 textboxes in the subform, and as many as 10
textboxes (and therefore 10 subforms) in the main form... of course
there will never be any instance where there are 10 subforms with each
with 10 textboxes... but there will be times when there are 10
subforms, and there will be times when there are 10 textboxes... it
also gets deeper in that the subforms would need to have their own
subform... but im not concerned about that quite yet

It sounds like you are trying to reinvent the wheel.

Instead of putting the textboxes directly on the form, create a
subform which contains the textbox.
--
Bob Quintal
Jul 13 '06 #4
i need to do something sorta like this i suppose...

http://www.tek-tips.com/faqs.cfm?fid=5757

i need to do it in access of course, and instead of just going from
1-10, it needs to look at the database, count the number of entries in
the related table that correspond with the entry in question in the
main table, and create that many textboxes and populate them with the
entries from the related table...

Jul 13 '06 #5
wr***********@g mail.com wrote in
news:11******** *************@m 79g2000cwm.goog legroups.com:
the problem is that there is an undetermined amount of
textboxes...
Wrong. the number of textboxes depends on the number of fields
in the underlying table. That is known at design time.

the main form will have a number of textboxes,
and each of those textboxes would have a subform which contain
a number of textboxes...
Wrong. each record in the main table would would have a subform.
The subform can have several rows. Sometimes you can have two
subforms, each related to a different field in the main form.

the number of textboxes in the main
form depends on which record the form as a whole is looking
at, and the number of textboxes in the subform would depend on
which textbox it was associated with... it all varies... i
know i could just manually create all these textboxes, and
only make them visible if there is information to populate
them with... but there could be as many as 10 textboxes in the
subform, and as many as 10 textboxes (and therefore 10
subforms) in the main form... of course there will never be
any instance where there are 10 subforms with each with 10
textboxes... but there will be times when there are 10
subforms, and there will be times when there are 10
textboxes... it also gets deeper in that the subforms would
need to have their own subform... but im not concerned about
that quite yet
>
>It sounds like you are trying to reinvent the wheel.

Instead of putting the textboxes directly on the form, create
a subform which contains the textbox.
--
Bob Quintal


--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jul 13 '06 #6
this still doesnt help me... I understand what you are saying, I just
dont know how to go about implementing something like that...

Jul 13 '06 #7
wr***********@g mail.com wrote in
news:11******** *************@s 13g2000cwa.goog legroups.com:
this still doesnt help me... I understand what you are saying,
I just dont know how to go about implementing something like
that...

Perhaps if you showed some sample data it might be easier to
explain.
--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jul 13 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2163
by: Lars Plessmann | last post by:
Problem: I try to store data in a objects field and read it out again. Sounds easy, yeah. But its a bit tricky here.... ;-) This is the class Customer.php with some setter and getter functions to store customers data within an object. It works. Furthermore, it includes a synchronize method, which calls the individual setXXX function and takes the data from the $_POST or $_GET var.
15
2214
by: dracolytch | last post by:
Good day all, Ok, I have a pretty tricky problem that I need some help with. I pass around search query information a fair amount (specifically WHERE statements). Normally, I just rawurlencode() the buggers, and pass them via the URL. I like having the where clauses in the URL, because then someone can just bookmark the URL, or send it to a friend, and I don't have to worry about a thing. If someone does a search that requires a LIKE...
1
1999
by: Tim | last post by:
Hello, I'm extremely puzzled; I cannot figure out what I'm doing wrong. Here's the situation. I would really appreciate any suggestions. I'm modifying a shopping cart in the following way. I've just added new prices to several drop-downs on our javascript-based ordering page. These new prices must have shipping costs added to them at the bottom of the ordering system in a text box called "Shipping", while the existing prices do not...
25
3412
by: PyPK | last post by:
What possible tricky areas/questions could be asked in Python based Technical Interviews?
13
2762
by: Steve Jorgensen | last post by:
== On Error Resume next, and Err.Number == If you want to call one of your procedures from another procedure, and check for errors afterward, you mayimagine that you should write code something like this... On Error Resuse Next MyFoo 123 lngErrNum = Err.Number On Error Goto 0
1
1395
by: Pea | last post by:
I'm working with a system usage database. I want to filter out repetitive logins. The query I have retrieves data like this: USER_DATE USER_TIME1 USER_USERID USER_ACCOUNT 10/01/2004 19:56 y708ga27 The Capital Group 10/01/2004 19:58 y708ga27 The Capital Group 10/01/2004 19:59 y708ga27 The Capital Group 10/01/2004 20:19 y708ga27 The Capital Group In a case like this - with consecutive logins for the same user, if
2
1825
by: pruebauno | last post by:
I am currently working on a tricky problem at work. I googled around a bit, but "time intervals" did not come up with anything useful. Although I have some rough idea of how I could solve it, I still would value some input. I have information of (It has only couple dozen entries.) ServiceNum, DollarCost and a input database table in the form (several GBytes): ClientNumber (CN), BeginDate(BD), EndDate(ED),
6
1760
by: Bill | last post by:
I'm building a simple file management application using Classic ASP VBScript that has a form to input page content, and file name. After the form is submitted, the application will check to see if a page with that file name already exists - if the file name already exists the user is quickly notified and asked to provide a different file name for that page. What I would like to do is, when the user submits the form, if the file name...
9
2360
by: raylopez99 | last post by:
Just an observation: pens for drawing lines in Win Forms are tricky when assignment is inside the paint handler. inside of the Paint handler, but not inside a "using" brace (that is, outside of "using { Pen mypen = new Pen(Color.Black, 1)) {}), which I think makes a difference: I find the following assignment does not work: //myPenTest instantiated in the normal constructor, as was baseline,
0
9669
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10427
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10207
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9995
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7537
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5431
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.