Travis...
still no luck. I changed the MyVal in the code you sent to MyVar. Otherwise an "variable not defined" error came up. In the samp_id field the code will add 1 to a numeric previosly entered value, but it will only do it for one record. If I enter a value such as GH184-1 then the code...
I have 2 fields in my db that include the same data type. Field "A" includes a shortform code for a value in field "B". I enter the code for field "A" in a form via a combobox valuelist. This valuelist has 2 columns. Column 1 is the code and is bound. Column 2 is the field "B" equivalent.
In my...
Travis....
I appreciate your help immensly, obviously Iam newbie to VB! I have included my code below. I keep getting error message "varible not defined". What am I doing wrong?
Private Sub samp_id_AfterUpdate()
If Not IsNull(Me.samp_id) Then
Me.samp_id.DefaultValue = "=" & x
Dim MyVar
MyVar...
Travis...The autonumber is not an option for me as my "sample_id" field often contains text as part of the value. I had minor success with the "afterupdate" function and adding 1 to the previous record but get stymied with the text characters in the field.
Example (record 1):
Samp_id
GH184-1...
I have a field called "Sample_ID" within a form. For each new record I enter I want to copy the previous "sample_id" value and add 1 automatically.
Example:
samp_id
565
566
567
568
569
Any suggestions are welcome.
I have a form with fields "From" & "To". I would like to be able to have the "To" value automatically become the "From" value for each successive record.
ie: FROM To
5.0 6.5
6.5 7.0
7.0 8.1
Any help would be greatly appreciated.