You cannot make a gradiant using 'color' - it can only have a single value. You need to use 'background. Have a look at https://codepen.io/cathydutton/pen/dPPpWj..
Or just Google 'CSS Gradiant' to get a list of online gradiant generators.
You cannot make a gradiant using 'color' - it can only have a single value. You need to use 'background. Have a look at https://codepen.io/cathydutton/pen/dPPpWj..
Or just Google 'CSS Gradiant' to get a list of online gradiant generators.
There Appears To Be Some Confusion.
The Server Name That You Are Being Asked For Is NOT Necessarily The Name Of Your PC. It Is The Instance Name Of The SQL Server Installation.
NOTE: You Can Have Multiple Installations Of SQL Server On The Same Machine
What Version Of SQL Server Are You Using, 2005 Express ? 2005 Standard ?
Check Out This Link :
http://www.informit.com/guides/content.asp?g=sqlserver&seqNum=29&rl=1
If All The Labels Are On The Same Form, Then Use A Control Array Of Labels With Index Values 0 To 9
Then A Loop Will Do The Trick
Function MaxLabel ( Optional nLoopMax as Integer = -1 ) as Long
Dim lMax as Long
Dim lValue as Long
Dim nLoop as Integer
If nLoop = -1 Then
nLoopMax = 9
For nLoop = 0 to nLoopMax
lVal = Val(Labels(nLoop).Caption)
if (lVal > lMax) Then
lMax = lVal
Next nLoop
MaxLabel = lMax
If You Don't Want To Check All The Labels, Then Pass The Index Of The Last Label In As A Parameter To The Check Function
You're Having A Laugh.....Surely !
If You Really..REALLY Don't Know How To Do This, Then Send Info On :
1. Why It Appears You're Using Dynamically Generated Labels
2. Where The Integer Assignements Come From (Random !, Database etc)
It Would Help If You Gave The Table Information & Your Attempts @ Joining Them. Then I Could Suggest A Course Of Action.
You Can't Embed Software Into A SQL Table Field !!
Do You Mean Put The Human-Readable Form Of A Barcode Into A Field That Can Then Be Extracted To Send To A Barcode-Printer ?
I've Used The Protocols Provided By Barcode/Label Printers Within VB6 App To Generate Barcode Labels.
This Is All Very Well, But You Haven't Said WHY You Want To Do This. If You Put It In Context, Then Maybe More Help Would Be Forthcoming.
Also, What About Words With Double/Triple Letters :
Food, Loot, Totty....Bookkeeping !
OK, But What Is It You Want To Do ?
1. Count The Number Of Different Combinations....This Is A Straightforward Factorial Problem.
2. Enumerate (List) All The Different Combinations....This Would Be A Big Long Loop. The Problem Would Be Making It Reasonably Efficient.
3. Compare A Given String & See If There Is A Suitable Combination That Matches It.
I'm Not Sure Using A Different Number Base Will Help You, Although It May Be A Maths/Algorithmic Thing !
I Don't Think There's A Built In Function Specifically To Change The Base.
The DIV & MOD Function May Help. Without Some Fancy Maths, Use These Functions To Create A String & Then Use The VAL Function.
To Add 1 To A Number In Base 6, You'd Have To Translate The Counter Into Base 10, Add1 Then Convert It Back Ito Base 6 (I Think)
You Say Something SEEMS Wrong. Did You Get A Runtime Error ? If So, What Was It.
It's Been A While Since I Did Any VB, So Someone Will Correct Me If I'm Wrong.....
There's Nothing Wrong With ck_chick.Value = 0. Check Boxes, Radio Buttons And A Host Of Other Controls (If Not All !) Have A Default Field That VB Assumes. Most Of The Time It Is The .Value Field. If You Just Use ck_chick = 0 Or opt_option1 = False, Then This Is Fine.
Hmmmmmm
I Know I'm New To DaniWeb, But I'm Afraid I Agree. I've Been Rather Suprised @ The Number Of Replies I've Sent Introducing People To Google !!!!
Is It Them Being Bone Idle......Or Me Beeing Too Stroppy ?
Are You Still Having Trouble With This Or Have You Sorted It ?
Yes, But You're Better Off Checking It Out For Yourself !
Just Try Google "Temp Table" !
Really, If You Just Google "Access Expression Builder" You Get Lots Of Useful Stuff.
However, As It's A Quickie. I Generated A Table (tblPerson) With FirstName, LastName & DOB. To Get The Ages Of The People, Use
SELECT szFirstName AS 'First Name',
szLastName AS 'Last Name'
DateDiff('yyyy', tblPerson.dtBirth, Now() ) AS 'Age'
FROM tblPerson;
Oh Yes, Used Access 2007. I Can't Say For Sure If The DateDiff Function Works In Access 200/Access 2003.
Just A Suggestion. Try Out Microsoft SQL Server 2005 Express. It's Free & Downloadable From http://msdn.microsoft.com/vstudio/express/sql/
OK, So I Assume You Have Something Like The Following (Using Visual Basic Terminology)
Sub TabMenu_Click (Parameter List)
{
Something That Tells You Which Button Has Been Clicked/Actioned - Then A Case/Switch Statement To Allow You To Call Code Specific To The Button
Select Case ButtonIndex
Case 0
Case 1
Button Code
etc
End Select
}
sub TextBox_KeyPressed (ParameterList)
{
Some Code To Validate Data Entry
Some Code To Check If <Enter> Has Been Pressed
When <Enter> Is Pressed & The Data Entry Is Valid, Then Call The Button Code
}
Is THAT What You Mean ?
OK. Cool.....Is It The DeskTop Version 'Cos I Just Tried With The Standard Version & It Basically Said Client Tools Only.
It Seems You Want 'comment_mreference' To Mean Two Different Things. Why Bother. Add An Extra Field Into tblRegister register_type (0=Admin, 1=Guest etc)
Also Include Administrators As Registered Users.
Don't Make Administrators An Exception That You Have To Work Around. Incorporate Them As If They Were Just Another User.
You'll Have To Excuse Me For Being Dense.
What Do You Mean - You Can't Use TabIndex Because You Used It For A TextBox ? Did You Not Read The Last Post ?
What Programming Environment Are You Working With ?
Web Stuff (.NET), Desktop Applications (VB6) ?
Is It That You Can Use A Mouse, But You Don't Want To ?
The Standard Way(s) To Do What You Want (Via The Keyboard) Is To Use ShortCuts (Ctrl-X, Alt-F4 etc) Or Use The Tab Key To Navigate To (Give Focus To) The Control In Question, And Use The <Enter> Key To Execute The Click Event.
If You're Convinced That You Can't Use These Methods, Then You'll Have To Explain Your Problem More Fully.
You Can't Install SQL Server 2000 Standard On XP Pro Either.
You Must Use SQL Server 2000 Desktop (Personal) Edition
It's Not Too Clear What You Want.
1. A Query That Gives You Rows Where id1<id2 ?
2. A Query That Gives You Rows Where id2<id1 ?
You Mentioned Temporary Tables, So Either You're Making Things Too Complicated Or I'm Completely Missing The Point !
I've Attached The SQL & Explanation For Both Queries
I Hope This Helps.
Rob
Here Is The Query For 'The Average Number Of Items Borrowed By A Customer On A Date':
SELECT COUNT(1) AS 'LoanCount',
(COUNT (DISTINCT iCustomer_ID)) AS 'CustomerCount',
(CAST(COUNT(1) AS Float) / (COUNT (DISTINCT iCustomer_ID))) AS 'Average',
CAST(dtLoaned as VarChar(11)) AS 'DateLoaned'
FROM tblLoan
Group BY CAST(dtLoaned as VarChar(11))
To Explain It :
SELECT COUNT ( 1 ) Will Count Up The Number Of Items Loaned
(COUNT (DISTINCT iCustomer_ID)) will Count Up The Number Of Distinct Customers
(CAST(COUNT(1) AS Float) / (COUNT (DISTINCT iCustomer_ID))) This Will Give The Average.
It Is Important That We Include CAST(COUNT(1) AS Float) To Make The Average A Float
CAST(dtLoaned as VarChar(11)) will Strip Out The Time From A Date Time Field - 01/01/2006 12:00:00 Becomes 01/01/2006
FROM tblLoan
Group BY CAST(dtLoaned as VarChar(11)) This Groups The Counts & Averages Into Seperate Counts/Averages Depending On The Date.
** Please Be Aware That This Is Done In SQL Server. Oracle Does Not Have A VarChar Type-Use VarChar2(11) In Oracle.
I Don't Think Oracle Has A specific Float Type, But Will Accept It In A SQL Query
*****
Here Is The Query For 'The Names Of The Customers Who Have Got The Maximum Number Of Overdue Items In The Past'
DECLARE @MaxOverdueCount Int
SELECT @MaxOverdueCount = MAX(tblTemp.overduecount)
FROM ( SELECT C.iCustomer_ID AS 'Customer',
COUNT(L.iLoan_ID) AS 'OverdueCount'
FROM tblCustomer C,
tblLoan L
WHERE C.iCustomer_ID = L.iCustomer_ID
AND L.iLoanStatus_ID = 2
group by C.iCustomer_ID ) AS tblTemp
SELECT C.vcCustomerName
FROM tblCustomer C,
( SELECT C.iCustomer_ID AS 'Customer',
COUNT(L.iLoan_ID) AS 'OverdueCount'
FROM tblCustomer C,
tblLoan L
WHERE C.iCustomer_ID = L.iCustomer_ID
AND L.iLoanStatus_ID = 2
group by C.iCustomer_ID ) AS tblTemp
WHERE C.iCustomer_ID = tblTemp.Customer
AND tblTemp.OverdueCount = @MaxOverdueCount
I've Had To Make This A Two Stage Query. My Head Hurts Trying To Do It One, But I Know That Some SQL Commands Don't Work In Oracle.
The ( SELECT C.iCustomer_ID AS 'Customer',
COUNT(L.iLoan_ID) AS 'OverdueCount'
FROM tblCustomer C,
tblLoan L
WHERE C.iCustomer_ID = L.iCustomer_ID
AND L.iLoanStatus_ID = 2
group by C.iCustomer_ID ) AS tblTemp
Creates A Temp Table With A List Of Customers & The Number Of Overdue Items Associated With Them. I've Had To Put An Extra Field/Attribute In The tblLoan Table. This Is iLoanStatus_ID - It Has A Value Of 2 When The Loan Is Overdue.
The tblLoan Table Links To A Seperate (New) Table tblLoanStatus With The Following Structure
pk iLoanStatus_ID Integer
vcLoanStatusDesc String
& Contents
iLoanStatus_ID vcLoanStatusDesc
1 On Loan
2 overdue
First, Find The Maximum Number Of Overdue Items For A Single Customer. This Is Assigned To The Local Variable @MaxOverdueCount.
Then Select The Customer Name For The Entry In tblTemp That Has The Highest OverdueCount.
Est Voila !!!!
I Know It's Late, But I Hope You Manage To Do Something With This Before The Deadline.
I'll Be Up & About For A While Yet If You've Got Any Questions. Don't Worry About Being Confused. It's Often The Case That You'll Have To Get Something Horribly Wrong Before Understanding Dawns. It Happens To Me More Than I'd Care To Admit.
Cheers
Rob
Firstly, I'd Suggest Microsoft SQL Server Expess, Rather Than Access. It's Free & Downloadable From http://msdn.microsoft.com/vstudio/express/sql/
It Allows You To Generate Relationships Between Tables & Create Constraints - Built In Mechanisms For Enforcing Data Integrity.
Aside From Anything Else, It's More Robust, Powerful & Easy To Use.
Check Out Amazon.com For Suitable Books For Beginners.
You Mentioned Customised Input Forms. I Assume You Were Thinking About Using VBA Within Access. If You're Feeling Adventurous, Try Visual Basic 2005 Express. Again It's Free & Downloadable From http://msdn.microsoft.com/vstudio/express/vb/
If Your Experience With Databases Is As Limited As You Say, It Seems Your Rather Jumping In @ The Deep End.
Maybe Focusing On Some Of The Fundamentals Will Provide A Better Starting Point.
There's Umpteen Books For Database Beginners (Amazon.com)
Google "Database Design" For Lots Of Useful Info & Guidance
First Off, If You Haven't Already Got A RDMS (Relational Database Management System) You Need Something Like Microsoft SQL Server Express. It's Free & Downloadable From http://msdn.microsoft.com/vstudio/express/sql/
It's Not Clear How Much Database Experience You Have, But Try Google "Database Design" - There's Plenty Of Links That Will You Guidance & Tips
Straight From MSDN :-
Control.TabIndex -
Gets or sets the tab order of the control within its container. Namespace: System.Windows.Forms
Control.TabStop - Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.
Namespace: System.Windows.Forms
For a control to be included in the tab order, its TabStop property must be set to true
Try Google "TabIndex" !!!!
First & Foremost, Why On Earth Would You Want To Monitor Changes (Inserts, Updates, Deletes, Create Tables !) In The WHOLE Database ?
What Programming Environment Are You Writing Your Application In ? VB6 / VB.NET /C# etc
If The RDMS Is Oracle Or SQL Server 2005 (Standard) I Believe You Can Register Queries Within The Database To Be Posted Notification Events. Try Google "Database Notification Events" !!!!
FYI : I've Done It Using SQL Server 2000, Database Triggers, Extended Stored Procedures & A VB6 Application.
I Think The New Layout Is Better.
I Wouldn't Worry Too Much About An Extra Join In The SQL Query. So Long As The PKs Are Integers & You Use Clustered Indexes (Assuming You're Using SQL Server / Oracle...)
A Couple Of Other Ideas :
The YellowCards/RedCards Could Be Made Into One Table With The Inclusion Of CardType Field.
The Player Table Is Really Just A Person Table. The Person Only Becomes A Player When Associated With A Team. If You Only Want To Include Players & Not Others Like Managers/Coaches etc, Then Why Not Put The Player Info Into The TeamPlayer Table. This Will Reduce The Table Joins By 1
I Know It's Still Eraly Days, But You Haven't Included The Score In The Matches Table.
Also, What About Own Goals In The Goals Table !
No, Not Always. If The Diagram Is Getting Messy, Then It Points Towards The Database Design Needing A Look At.
I've Checked Out The Sample Pic & My Thought Is That There's A Lot Of Pairings Of Player_ID & Team_ID. Maybe A Seperate Table With These Two In Would Rationalise Things A Bit.
Good Luck With The Website
Please Tell Me You've Sorted This By Now.
Try An Embedded Connection String !
Google "database connection strings" For Details
Hey,
I've Attached The Reply.
What About The SQL ? Have You Got SQL Server Or Some Other RDMS To Play With ?
Where Is The Formatting Taking Place - SQL ?
FORMAT Is A (Among Other Things) A VB/VBA Command - NOT SQL
Regardless Of This, 31st Dec Is the 1st (Or 2nd Day In A Leap Year) Day In The 53rd Week. 52 * 7 = 364
You Say You Want The Working Week. What Exactly Is This ? What Day Does Your Week Start.
Also If 30th Dec 2006 = 52 2006 Week 1 Day 1 = 1st Jan 2006
However You Say You Want 31st Dec 2006 = 01 2007 - This Means 1st Jan Is Week 1 Day 2
This Is Not Consistant
Try Using The Days In The Year - WW = ((Days DIV 7) MOD 52) + 1
Hey,
I've Attached The Relationship Diagram.
It Might Not Mean Very Much Without The Table Contents To Flesh It Out. But I'll Get To That Soon.
How Much Detail Do You Want To Go Into With The SQL. I'm Writing Stored Procedures & Functions To :
Manage Staff (Add, Change, Remove)
Manage Customers (Add Change, Remove)
Manage Items (As Above)
Manage Loan Transactions...etc
Hope This Helps.