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

Form and dates problem

8
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 1322
missinglinq
3,532 Expert 2GB
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
OOps- Hope it works this time.
thanks
L
Attached Files
File Type: zip sickness.zip (39.4 KB, 116 views)
Nov 29 '08 #3
PianoMan64
374 Expert 256MB
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
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 Expert 2GB
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 Expert 256MB
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
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 Expert 1GB
In your query, you must have 2 tables with the StaffID field. Change the one query field to say TableName.StaffID, and it won't gripe at you anymore.
Dec 3 '08 #9
Lindie
8
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
ChipR
1,287 Expert 1GB
That error suggests that your SQL statement has

SELECT StaffID, ..., StaffID FROM Table1, Table2

so you are trying to select the StaffID from 2 different tables. You can change it to

SELECT Table1.StaffID as NewName, ..., Table2.StaffID as OtherName ...

That way you can specify which table it's from and give the fields different names.
Jan 5 '09 #11

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

Similar topics

3
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...
1
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...
1
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...
3
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...
3
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...
10
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...
5
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...
2
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...
4
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...
5
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...
0
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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.