Increment A String
Hey,
This is probably one of the simplist questions ever, but I have only just started using VB doing the majority of my programming in java.
I have a string
strReference which holds a character (eg 'A')
I simply want to get the value of the next character.
In java I could simply do strReference ++
but this is not avaliable and adding 1 gives a type mismatch.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Increment A Value Of String
I have t he requirement where the string should get incremented in the last place (Ex: group1.goup2,....group n) Here the value of n should get increased and get inserted into the database..
This should be done in VB 6.0
If anyone has any idea regarding this pls try to post your view..
Thanks & Regards
Vamsi Krishna
String Increment
hi experts
last time you gave me this code for string increment
AI/WE/23--+1 increment--->AI/WE/24
but when i passed
AI/WE/001--+1 increment--->AI/WE/2
i required
AI/WE/002
plz help me ,what chang i make this function
thanks in advance
Public Function IncrementString(ByVal sTxt As String, ByVal nIncrement As
Long) As String
Dim sParts() As String
Dim nUpperIdx As Long
'Split the string into different parts, use / as the delimiter
sParts = Split(sTxt, "/")
'the part to increment is the last number
nUpperIdx = UBound(sParts)
'Check that this part is numeric
If IsNumeric(sParts(nUpperIdx)) Then
'increment this part with nIncrement
sParts(nUpperIdx) = CStr(CLng(sParts(nUpperIdx)) + nIncrement)
End If
'Join the parts again and return the new string
IncrementString = Join(sParts, "/")
End Function
String Increment
i have strings values i required
AI/vb/sql/34 ---> after 1 increment--> AI/vb/sql/35
AI/vb/25 ---> after 1 increment--> AI/vb/26
Any Function or Code Plz help
Increment Numbers In A String
Hello all
I want to write files to disk with an incimental number each time the file is written. e.g. file001.txt file002.txt etc. I have a counter that increments the number which is obviously and integer. But I want to keep the preceding zeros and they obviously are not there in an integer.
Is there a neat way of including preceding zeros or do I have to do a whole bunch of if statements to add the correct number of zeros if the number is bigger than 9 / 99 / 999?
Thanks
Increment String, I.e. TD100099
Hi
I am wondering if there is an easy cool way to accomplish this:
I have a stringvalue, i.e. TD100099, Now I want to increment this value with 1, so the new value will be TD100100.
The problem is that I dont know how many leading characters the string contains (i. e. TD) in advance.
How Do I Increment An Hex Number Inside A String?
I have this string:
"ecc9ddaa-6643-429b-9844-8dc429826254"
and I want to add a number to the last section, I splited this string:
Lsec(0)= "ecc9ddaa"
...
LSec(4) = "8dc429826254"
Now I want to add 15 to this number (Lsec(4)), and then change it back to a string so I can get something like this:
"ecc9ddaa-6643-429b-9844-8dc429826263"
Any ideas?? :S
btw ... I'm using VB 2005
Txt Increment
Hi,
Does anybody have any ideas on how I could achieve the following
I would like to Increment Letters. E.g
If I type A to D
Then it would return A, B, C, D,
Thanks in Advance
Pawel Humanski
How To Increment This And Use Ado?
Hi guys I need to display these data in array buttom like this
1 to 6 Display data 1 to 6
7 to 12 the same for this..
13 to 15 the same for this...
Code:
declare @startRow int;
declare @pageSize int;
set @startRow = 1;
set @pageSize = 6;
select FirstName, LastName
from (
select row_number() over(order by LastName) as [RowNumber],
FirstName, LastName
from Person.Contact
where LastName like 'D%') as Derived
where RowNumber between @startRow
and @startRow + @pageSize - 1;
Elvis Cabral
Increment
Hi!
The form name is binaryform7 in the attachment.I want that:
1)The value of parameter count shud be incremented to 1 when clicked on NEXT PARAMETER
When i typed the following code in the button of NEXT PARAMETER click event,it gave me a surprising output...i am definately wrong but pls correct me
VB Code:
For i = 1 To Combo1.ListCountText3.Text = i + 1Next i
2)There are 2 combo boxes.1 is CALCULATION MODEL and the other is SELECTED PARAMETERS
We can select multiple values from the CALCULATION MODEL and those selected only will appear in the other combo box.
3)The no. of values into the CALCULATION MODEL,till that number of times only will the parameter count increment.
For example,If the number of values in Calculation model is 15,the parameter count will maximum be incremented till 15 not more than that.
Pls help!
Thnx!
Increment Value
I have a table with TransactionID field (Number Data type) I dont like to use AutoNumber.
I also have a textbox and a button in my form. During run time I will check whether the transactionID field has a value by clicking New button. If there's no value (which of course at first table is empty) I assigned a value to it which will then be displayed in the textbox and the same value will be INSERTED/save when i click a save button.
The problem is when i click the New button 1 is added to the existing record. the third time and so on i click the New button. The value is now not incrementing, it is stuck to 2.
My code:
VB Code:
Dim rsCashSales As New ADODB.Recordset sSQL = "SELECT TransactionID FROM tblCashSales" If rsCashSales.State = adStateOpen Then rsCashSales.Close rsCashSales.Open sSQL, oConn, adOpenStatic, adLockOptimistic If rsCashSales.EOF = True Then txtTransactionID.Text = 1 Else txtTransactionID.Text = CLng(rsCashSales.Fields("TransactionID")) + 1 End If sSQL = "INSERT INTO tblCashSales (TransactionID,Cashpayment) VALUES " & _ "('" & txtTransactionID.Text & " ','" & CCur(txtAmountDue.Text) & "')" oConn.Execute sSQL
What's wrong with my code?
Increment One Day
Quick question:
I have
VB Code:
txt_Date.Text = Date.Now.Today()
and want to increment/decrement 1 day based on whatever today's date happens to be. How would I go about doing that?
Thanks-
m
Txt Increment
Hi
I would like to know how would I be able to perform a txt Increment.
Eg if the User types A to D
The program would display A, B, C, D
Or AA to BB
Would display AA, AB, BB
Thanks in Advance
Humanski
Increment
This is gonna stupid but is there and Increment function in VB? that will inc any integer var by another integer or just 1.
thanx
How To Increment This
Hi
here is the formula I use:
For Each cl In Worksheets("SHEET2").UsedRange
Worksheets("SHEET3").Cells(cl.Value, cl.Column) = "1"
Next cl
this is what it does:
sheet 2
A1) 5
A2) 3
A3) 7
it converts the data to this
sheet 3
A3) 1
A5) 1
A7) 1
the problem is if I have :
sheet 2
A1) 2
A2) 2
A3) 3
converts the data to this:
sheet 3
A2) 1
A3) 1
I need it do this:
A2) 2
A3) 1
any ideas ? (the sheets are excel worksheets if it matters)
thanks
lrneilson
How Would You Do Something Like This? (Increment)
Hey everyone.
I think I may be getting in over my head, but hopefully I wont have the stare when all is done.
In the screenshot you can see the general layout
What I have so far is
Code:Private Sub Command1_Click()
Dim vTempLine As String
vTempLine = Chr(34) & Text1.Text & "$$bind_load_file " & Text5.Text & Chr(34)
List1.AddItem vTempLine
End Sub
This works great for Text1.
What I need to is, when I click > it goes to each text box and adds the path to each piece of text then drops it into the list box. If that wasnt enough I also need to increment the text file.
So Test.txt would become Test1.txt etc...
And the 100$ questions: How would I go about something like this?
Edited by - Logan 5 on 6/21/2004 10:58:59 AM
Variable Increment By Itself
Hi fellows,
I know this may seem like a stupid question, but I have tried several ways to get it to work, but with no luck.
here is my code below, before I explain the problem:
Code:
Private Sub btnCalculate_Click()
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim d As Integer
Dim e As Integer
Dim f As Integer
Dim g As Integer
Dim h As Integer
Dim ti As Integer
Dim nsteps As Integer
Dim td As Long
Dim pd As Long
Dim Qg As Long
Dim hh As Long
a = CInt(txtRop.Text)
b = CInt(txtKg.Text)
c = CInt(txtPhi.Text)
d = CInt(txtCp.Text)
e = CInt(txtMui.Text)
f = CInt(txtRw.Text)
g = CInt(txtPf.Text)
h = CInt(txtPwf.Text)
ti = CInt(txtTimeSteps.Text)
nsteps = CInt(txtSteps.Text)
Dim x As Integer
Dim i As Integer
For i = 0 To (nsteps - 1)
td = (7.324 * 10 ^ 8) * ((b * ti) / (c * d * e * (f ^ 2))) ' td
pd = 0.5 * (Log(td) + 0.81) 'pd
hh = a * ti ' hh
Qg = ((b * hh) / (50.35 * e)) * ((g ^ 2 - h ^ 2) / (pd * h)) 'Qg
lstData.AddItem (CStr(Qg)) + vbTab + vbTab + (CStr(hh))
lstTi.AddItem (CStr(ti))
x = ti ' Thought I could use these 2 lines to do it,
ti = x + ti ' but with no luck
Next
End Sub
basically I have a form in which the user can enter several numbers, on the click of the button, then a calculation is made, and the results of two final values Qg and hh are listed in the listbox as can be seen above. However I need the variable ti to increment by itself based on the value entered by the user in its associated text field. For example if someone enters 12, I want it to increment itself like 12, 24, 36, 48 etc.. With what I currently have, it just doubles itself each time. I have tried several methods and thought this one would work, but they all just double the variable instead of incrementing it by itself.
P.S. I used the second listbox lstTi just to monitor the value of the variable ti
I would appreciate some assistance with this matter.
Thanks
For Next Loop Increment
I want a For next loop that increments by 5 instead of one:
Code:
For j = 5 to 200
'CODE
Next
I want the j to go 5, 10, 15, 20, 25, ect. Is there an increment command to do this?
Thanks
Cant Seem To Get My Counters To Increment
Code:
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Dim strFileName As String
Dim arrRawData() As String
Dim strLine As String
Dim numberOfLines As Integer
Dim i As Integer
Private Sub cmdStart_Click()
strFileName = "C:windowsdesktopTaskMyfile.dat"
numberOfLines = openInputFile(strFileName)
arrRawData = fillArray(numberOfLines)
'lblDisplay.Caption = numberOfLines
End Sub
Public Function openInputFile(strFileName As String) As Integer
Dim count As Integer
Open strFileName For Input As #1
Do Until (EOF(1) = True)
Line Input #1, strLine
count = count + 1
Loop
Close #1
openInputFile = count
End Function
Public Function fillArray(count As Integer) As String()
i = 0
ReDim arrRawData(count)
Open strFileName For Input As #1
Do Until (EOF(1) = True)
Line Input #1, strLine
arrRawData(i) = strLine
i = i + 1
Loop
Close #1
fillArray = arrRawData()
End Function
Variables i and count here.
Thanks for help!!!
Auto Increment
I have a form that I want to have a number in a textbox for example increment every time the user clicks a command button. I know how to do this, but when the application closes the number gets reset. Textbox.text=103 is at the start. When the user clicks it goes to 104 etc. If the application is closed, I want the number to remain as 104 and whne it is opened again and the user clicks, the number will change to 105 etc.
Thanks
Can You Increment A Variables Name?
I have a situation where I have say 40 variables with the names
Con1, Con2, Con3
Is there a way that I can change which variable I am writing to using an integer value behind the con
i.e.
dim lngNumber as long
Con & lngNumber
lngnumber=lngnumber+1
Thanks
Increment And IP Address
I am very new to programming and am looking to write an app to scan all our pc on the LAN to retrieve software that's installed on the and some simple info about the system.
I have most of it working, but would like to be able to use a Start IP address and an End IP Address and scan everything in between.
Unfortunatley I have no idean how to do this. I found the inet_addr() funstion that converts an IP address in the form 127.21.0.87 to a number and the inet_ntoa fuction to convert back to the IP address. The thing I need to do is increment the IP address each time around;
e.g.
Start at 10.0.0.1
End at 10.0.2.255
And scan everything in between.
this has been annoying be for a week now without any sucess, so if anybody can help I'd be grateful.
thanks
Increment Problem
I have created the following code that will Increment numbers that users specify, The only problem that I am having is I cant get it too work when I put a number larger then 10 in because it automatically adds a "0" I have tried to sort this problem but cant seem to figure out the correct way, can anybody help!!
Private Sub CmdGenerate_Click()
Dim i%, j%, k%, UBoundIndex%, UBoundIndex1%, UBoundIndex2%, UBoundIndex3%, UBoundIndex4%, UBoundIndex5%
Dim RetVal
List1.Clear
UBoundIndex = InputBox("Enter First From Column Number.", "Counter")
UBoundIndex1 = InputBox("Enter First To Column Number .", "Counter")
UBoundIndex2 = InputBox("Enter Second Column Number.", "Counter")
UBoundIndex3 = InputBox("Enter Second To Column Number.", "Counter")
UBoundIndex4 = InputBox("Enter Third Column Number.", "Counter")
UBoundIndex5 = InputBox("Enter Third To Column Number.", "Counter")
For i = UBoundIndex To UBoundIndex1
For j = UBoundIndex2 To UBoundIndex3
For k = UBoundIndex4 To UBoundIndex5
If UBoundIndex < 10 Then
List1.AddItem "" & i & "-" & "" & j & "-" & "" & k & "," & List1.ListCount
If UBoundIndex >= 10 Then
List1.AddItem "0" & i & "-" & "0" & j & "-" & "0" & k & "," & List1.ListCount
End If
End If
Next k
Next j
Next i
Increment Function
i cant find an increment function in vb6. so i tried to write my own:
private function inc(byref var as integer)
var = var + 1
end function
but it does not work, why?
sorry if its a really n00b question
Auto Increment
hi all experts,
I have 4 different tables in MS-ACCESS.
i'm doing project for an engineering company. So they have different jaws for CNC machines. like OD DIAMETER, ID DIAMETER, MULTIPLE OD DIAMETER and MULTIPLE ID DIAMETER
i want to keep track of each issue of jaws to the worker......
so my question is that can i get one receipt number which is AUTO INCREMENT......and that will be unique for each issue of jaw.......is it possible to track 4 tables for AUTO INCREMENT of the receipt number.....
i think i'm clear in describing my question.........
need help
sachin
Increment Values
Is there a way to number the records and grab that value? For example, If I have "Select store, sales from SalesOrders order by sales desc" that I display in a grid. I want to diplay what number each record is. Is there a way to create and return those number in sql?
I know there are ways to create the numbers in vb but I really want it in my sql statement
Increment Field In Db...
hello...im trying to do a simple increment using access and vb6...on form load i set the connection to the db and created a select case function that would read the number of a field in the table...if its case 0 --> lblweek.caption = "Week 1" and so, up to "Week 10"...
i want to increment that single field in the table by clicking a button (send)...how is this possible?...thanks for your help...
Automatic Increment
Hi,
I am new to database programing and have this problem I can't find an answer to. This is the code I am using.
Code:
Set conData = New ADODB.Connection
conData.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & App.Path & "data.mdb"
strSQL = "CREATE TABLE League (" & _
"ID Integer NOT NULL IDENTITY(1,1) PRIMARY KEY," & _
"LeagueName Varchar(50)," & _
"BowlingCenter Varchar(50));"
conData.Execute strSQL
Set conData = Nothing
However when I add data the ID (primary key) does not increment. All my ID's are 1.
What am I doing wrong?
Thanks for your help.
Increment A Date
Hello,
I have an app that has an odbc connection to an access database. In that databse I have a date field, but at a certain time I want to increment that date field in 12 days.
For example, if the date is 1-9-04, it goes to 13-9-2004.
How can I do that?
Thanks in advance...
Problem With Increment
Hi Everyone , have a nice day
well i am upto making a real time trend display in vb and for starting with i have randomly generated integers and trying to display them in a picture box , this is what i have so far
VB Code:
Private Sub Command3_Click()Dim counter As IntegerDim oldvalue As IntegerDim i As Integeri = 0 oldvalue = 10 counter = oldvalue Timer1.Interval = 1000 Timer1.Enabled = TrueEnd SubPrivate Sub Command1_Click()Dim txt As IntegerDim fb As IntegerDim ff As Integerfb = FreeFileff = FreeFile RandomizeOpen App.Path & " ime.txt" For Output As #fb Print #fb, (CInt(Rnd() * 200)) Close #fb Open App.Path & " ime.txt" For Input As ff txt = Input(LOF(ff), ff) Close ff Picture1.Circle (600 - (i * 5), 201 - txt), (2), vbYellow Label1.Caption = i End SubPrivate Sub Command2_Click()Unload Form1End SubPrivate Sub Timer1_Timer() i = i + 1 If counter = 0 Then Command1 = True counter = oldvalue Else counter = counter - 1 End IfEnd Sub
what this suppose to do is that display those random numbers in that picture box and goes to right from left with each next value (inside picturebox)
problem is my variable "i" isnt getting anything in command1_click
i have label1 to show me in run time that value its getting , but it goes blank , where am i making a mistake ?
Regards and Waiting
Increment MonthName()
MonthName() returns the name of the month
I'd like to have a button that when clicked would increment month name (January...February...March and so on ) When it gets to December, the next one should be January.
VB Code:
MonthName(2) ' will return "February"
How can I increment do this? DateAdd()?
Increment A Date
Hello,
I have an app that has an odbc connection to an access database. In that databse I have a date field, but at a certain time I want to increment that date field in 12 days.
For example, if the date is 1-9-04, it goes to 13-9-2004.
How can I do that?
Thanks in advance...
Auto-Increment
I need to auto-increment a number field but I don't want to use the auto-increment in the .mdb database. Anyone know how to do this? I'm using vb6 with the adodc data control.
Thanks
Increment Numbers
Hi,
I am trying to write a program that will increment numbers. I want to specify two sets of numbers and then generate them.
So :-
01-01-01
to
03-03-03
Would generate
01-01-01
01-01-02
01-01-03
01-02-01
01-02-02
etc etc
does anybody have any ideas how I could achieve this
thanks in advance
Humanski
Increment Field In SQL?
How can I do an autoincrement field on an existent field in a table "MSAccess" in SQL? I know how to do it in DAO but I do not know how to do it in SQL.
Also I would like to know how to create a new incrment field in an existent table in SQL code.
Auto Increment
Hello.
In database, I would like change one field property. The num auto of my field property is true and i would it become false.
How can i do ?
Thank's
CBC
UpDown Increment
hi there
I have placed an UpDown next to a text box, and set it to auto buddy to increment the number in the textbox!
However i don't seem to be able to set the incrememnt to less than 1. Is there any way i can do this
Increment Problem
Hi...I've got a very large worksheet (10,000 rows) in a spreadsheet that I need to make smaller (obviously). A pull from our system at work created this Excel spreadsheet and instead of being 2000 rows, it was 10,000. It included a field that isn't needed which is why it over bloated itself. Anyways, I need to transpose the values from one column, over four columns. I have no problem getting my macro to do it to one specific range of cells, but I'm unsure of how to go about getting it to do it for the entire worksheet. I have included my code below. I started to do it manually, as my code will indicate, but wanted a better and faster way of doing this.
Code:
Sub MyTranspose()
'------------------ BEGIN - USER MODIFIABLE SECTION ------------------
r_first = 163 ' the row BEFORE the first row of your list
r_last = 9958 ' the last row of your list
r_step = 4' the number of rows between the row borders
'------------------ END - USER MODIFIABLE SECTION --------------------
Dim a As Range
Set a = Selection' remember cell selection
Cells.Select
For r = r_first To r_last Step r_step
Range("E164:E167").Select
Selection.Copy
Range("F9").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Next r
If (r_last - r_first) Mod r_step <> 0 Then
r = r_last
Range("E164:E167").Select
Selection.Copy
Range("F9").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
End If
End Sub
Increment Not Working
can someone help me this is weird, my login attempts counter isn't incrementing and stays at one my code is listed below
Private Sub cmd_loginapp_Click()
If loginattempts > 2 Then
addnewlog "LOGIN FAILED", "3 INVALID LOGIN ATTEMPTS"
MsgBox "3 INVALID LOGIN ATTEMPTS - PROGRAM EXITING"
End
Else
If txtusername.Text = "???" And txtpassword.Text = "????" Then
MsgBox "Welcome, ??? - you have logged in"
Unload frmlogin
loggedon_buttons
addnewlog "ADD ACCOUNT", "LOGGED IN AS ??? @ ??? ON ????"
Else
MsgBox "LOGIN FAILED"
addnewlog "LOGIN FAILED", "INVALID LOGIN ATTEMPT"
loginattempts = loginattempts + 1
End If
End If
End Sub
Edited by - xathras on 7/21/2005 1:11:50 PM
Increment Letter A To B....like A+1 = B
Hi,
Is't pssible to increment letter A to B to C..... in code like
Letter = "A"
Letter = Letter +1 'I know this code's not good but how can I do that.
Thanks
Redg
Increment A Charactor
Hi Guys,
How do I increment a Charactor? I have a variable
that = a letter and I want to increment it to the next letter
in the alphabet in a loop.
Thanks
Jim
Increment A Charactor
Hi Guys,
How do I increment a Charactor? I have a variable
that = a letter and I want to increment it to the next letter
in the alphabet in a loop.
Thanks
Jim
Automatic Increment Of A Field-HELP
The table consists:
Certificate Number
Inpection Date
Due date
I enter the value (i.e ABs) in the certificate number,
at inspection date 5/5/2003 for example.
What I want is to display the date in the dueDate field which is incremented by one year-->5/5/2004 or 6 months e.t.c but automatically.
Maybe I should make a query or sth like that.
Please help me if you can.
Thanks in advance,
Xneo1
Increment Using Alphanumeric Values?
yup, I was looking for a way to increment in terms of letters, i.e. a+1 = b
Im looking to do it in Excel VBA
I am currently doing:
Code:
'Select first data cell
Range("A4").Select
'Find the selection to the last filled cell
Selection.End(xlDown).Select
'Select the found range
Range("A4:A" & Selection.Row).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
but I need to do this on say 30 columns, If anyone has a suggestion on how to do this with a loop please help
Increment Date With Each New Row Inserted
This is part of an ongoing problem related to earlier submissions see threads:
http://www.xtremevbtalk.com/showthread.php?t=237415 http://www.xtremevbtalk.com/showthread.php?t=239022
My approach is very long winded but at least I am learning (debatable)
So far I have the following code working which inserts multiple rows in a spreadsheet based on a value in column B:
Code:
Sub duplicateRows()
Dim myWs As Worksheet
Dim midRows As Long
Dim FRow As Long
Dim LRow As Long
Dim RemainingRows As Long
Set myWs = Worksheets("Sheet1")
With myWs
FRow = 2
LRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For midRows = LRow To FRow Step -1
RemainingRows = .Cells(midRows, "B").Value - 1
If RemainingRows > 0 Then
.Rows(midRows + 1).Resize(RemainingRows).Insert
.Cells(midRows + 1, "A").Resize(RemainingRows, 1).Value _
= .Cells(midRows, "A").Value
.Cells(midRows + 1, "B").Resize(RemainingRows, 1).Value _
= .Cells(midRows, "B").Value
End If
Next midRows
End With
End Sub
Now I want it to take a date value in column C and increment it in column C of each new row it creates (so it increments the date the same number of times specified by column B).
If I am not making sense here, please let me know and I will try to explain better.
Auto Increment Alphabet
Hi All,
I am new to VB and im trying to solve a tricky issue.
I am trying to loop through the alphabet a-z and have the vaule appear in a text box on my access form.I also wnat the dat to appear(20060420) before the letter? i dont know how to do this? So everytime a user submits a new record the date will appear with a new letter will appear? the below code works in the befor e_Insert property, but it only increments one letter? Can you enhance this or give me pointers?
Thanks
Code:
Private Sub Form_BeforeInsert(Cancel As Integer)
thisletter = "A"
thisletter2 = "B"
If Me.NewRecord = True Then
nextletter = Chr(Asc(thisletter) + 1)
End Sub
Don't Increment Weekends In A Date
Hello,
I have a date field in a database and I have a function that increments that date in 12 days.
My question is if it's possible to increment only work days and not increment weekend days.
Thanks in advance...
How Does Auto Increment Work?
What does VB consider to be a major, minor and revision when auto increment is turned on, and is there any way to change this?
|