Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Monthly Calculations...

Status
Not open for further replies.

Jusenkyo

Programmer
Aug 16, 2002
295
GB
Hi all

I have a table with dates, increasing by month, as column headings.

I want to do a simple calculation, (X*Y), and stick the result in the column, depending on what month it is...

Can someone tell me the best way to manipulate the column headings, so I can compare them to the month...

i.e. - If column heading month = Jan, X*y+4, etc...

Cheers all

 
If column heading month = Jan
Which column heading are you talking about ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
try this

Sub test()

Dim rst As ADODB.Recordset

Set rst = New ADODB.Recordset

rst.Open "tblMonths", CurrentProject.Connection
If rst.Fields(0).Name = "Jan" Then
MsgBox rst.Fields(0).Name
End If
rst.Close
Set rst = Nothing
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top