473,772 Members | 3,752 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form and dates problem

8 New Member
We have an Access sickness tracker. The form FrmDetails&sick shows a subform with the dates of the sickness absences.
The dates are not showing in chronological order. I just cannot work out why.
Any help would be greatly valued.
Lindie
Attached Files
File Type: zip sickness-www nov08.zip (34.3 KB, 117 views)
Nov 28 '08 #1
10 1349
missinglinq
3,532 Recognized Expert Specialist
As Dorothy Parker said about the city of Seattle, "There's no there there!"

The zip file you posted is empty! Try again!

Welcome to Bytes!

Linq ;0)>
Nov 28 '08 #2
Lindie
8 New Member
OOps- Hope it works this time.
thanks
L
Attached Files
File Type: zip sickness.zip (39.4 KB, 117 views)
Nov 29 '08 #3
PianoMan64
374 Recognized Expert Contributor
Hey Lindie,

Since you're making things really difficult for yourself by basing your forms on a table instead of a query, you limit yourself to what you can sort and limit the records returned. This is the reason sometimes you want to base your form on a query or a SELECT Statement like I've done.

I'll attach your database again, and look in the subform for the recordsource, and you'll see what I did. Just go into the query designer mode, and you can see what it looks like?

Hope that helps,

Joe P.
Attached Files
File Type: zip sickness-www nov08.zip (46.6 KB, 73 views)
Nov 30 '08 #4
Lindie
8 New Member
Thanks Joe, that does the trick. So you have created a querie and based the form on that.
You say that sometimes one wants to dothis. When it is better then to base the form on a table?
I still don't understand why the dates were not chronological- is there a simple explanation?
Lindie
Nov 30 '08 #5
missinglinq
3,532 Recognized Expert Specialist
You always should base a form on a Query, rather than a Table, for the very reason you've seen here; a Query allows you to manipulate the data, such as sorting by the dates!


Linq ;0)>
Nov 30 '08 #6
PianoMan64
374 Recognized Expert Contributor
Hey Lindie,

The simple explanation is this. If you're going to want to manipulate the data in any order other than what it naturally is in the table, which is most of the time, you're going to want to base your form on something other than a table.

If the form that you're attaching to a table is simply for data input, and nothing more, then you would simply bind it to the table directly without a query.

That's the simple explanation of what I'm saying.

If you look in the record source of the form, you'll see that there is a SELECT Statement in there. That way, you don't have to create a query, but you would create the fields, and order that you want a form based on.

If you have any more questions, please feel free to ask,

Hope that helps,

Joe P.
Dec 1 '08 #7
Lindie
8 New Member
Ah, its beginning to sink in. the Select statement; I had not spotted that.

So, does that then mimic a Query? I already have a Query; QryAll. I have just tried to base the subform on that. I get an error statement saying that
"The specified field 'StaffID' could refer to more than one table listed in the FROM clause of your SQL statement."

I cannot see how to fix that. Where amI going wrong?
Lindie
Dec 3 '08 #8
ChipR
1,287 Recognized Expert Top Contributor
In your query, you must have 2 tables with the StaffID field. Change the one query field to say TableName.Staff ID, and it won't gripe at you anymore.
Dec 3 '08 #9
Lindie
8 New Member
Sorry to get back after such a long time. I just looked at your answer again.
I'm lost! I cannot work out what is meant by '..Change the one query field..'.
Which filed?
Happy 2009
L
Jan 4 '09 #10

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

Similar topics

3
78894
by: RC | last post by:
I am try test a simple HTML form with PHP <form method=POST action="testing.php"> Cat <input type="checkbox" name="pet" value="cat"> Dog <input type="checkbox" name="pet" value="dog"> Pig <input type="checkbox" name="pet" value="pig"> <br> <select name="dates" multiple> <option value="Monday">Monday</option> <option value="Tuesday">Tuesday</option>
1
1554
by: David B | last post by:
In a reservations app I have a sub form (in datasheet view) that displays dates in desc order. As these dates are both in the past and present I would like current dates to appear when the form opens. ie. scroll up for future and down for past. Slight problem is that today may not be in the list. (Could be closed every Friday) Any thoughts on how to deal with this ? TIA
1
2917
by: longtim | last post by:
I have been having endless difficulty creating reports/queries that set any relevent parameters from controls in forms. I am creating an application under access 2003 but will target access 2000. The access file is in access 2000 format. I have a form that will hold the relevent parameters for the query/report that reports the statistics for all job records that match a certain criteria. These are: - A Customer Name.
3
3435
by: StBond | last post by:
Hi everyone, I am new to Access and Visual Basic so things my be getting across a bit cloudy. I only started using VB for one week. I am having a little problem with the database that I am working on. I am working with MS Access 2002. And I am having a problem with one of my charts. I will explain how everything is laid out then go into details.
3
1717
by: Vi | last post by:
Hi, I have a form which displays some orders based on dates selected or based on an order number. I have two different buttons for each kind of query, but both buttons call the same method in the code behind page. I'm validating the dates and if they're not ok, I set args.IsValid=false; In the method that retrieves the orders, I check if Page.IsValid. This way if the dates are not valid, the retrieval by dates is not working, but so is...
10
2252
by: RoadRunner | last post by:
Hi, I have a employee vacation database that has a vacation table that has the employee name, pay week and date of vacation. I have another lookup table with pay week code and date range for the week. The user would like to type in a date in the Date of Vacation field and have the Pay Week field automatically fill in. My dlookup code is not working. Here is example of what the tables look like: Employee: Name Pay Week Date of...
5
3172
by: Easystart | last post by:
Hi, Sorry for my English. English is not my native tougue. I am working in MS Access 2000 with a SQLServer 2000 Backend database. MS Access 2000 is my GUI front end that has SQLServer linked tables in it. One of my forms has two TEXT BOX controls formated as Short Date. The form is binded to a linked table. The linked tables has about 7 records and one of the control is binded to a table field. These two controls displays the date...
2
5739
by: Mark Roughton | last post by:
I have a form where the users need to view records for various criteria, one of which is a date field on which they may wish to view all related data for the selected date, for all dates upto and icluding the selected date or all records on or after the selected date The user selects either "=", >=" or "<=" from a combo box and then a date from another combobox. The combination of thse two choices is then set in an unbound textbox so...
4
1637
by: jnice814 | last post by:
I have created a frmTimesheet form where auditors will enter their hours for audits that they've worked on. I know how to build a very basic, no-frills database, and what I'm trying to accomplish here is a bit beyond my true technical expertise. At this point, the auditor can select his/her name on the primary Form which will filter any/all audits that they have charged time to (subForm). The subForm details the audits, dates, and hours...
5
1640
by: thecheyenne | last post by:
Hi there and happy new year to all of you. I've been reading the thread "Auto Date in form "pages" from 'frys' in the topics and his/her problem is similar though not identical to mine. Here is my database structure which works, crudely, but I'd like to re-fine it, if possible, so feel free to give your 2-pence on my design effort My 'journal' is actually a time-table for an educational establishment. It relates to my lessons over the week,...
0
9620
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
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10104
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
9912
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...
0
6715
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
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.