I think you have to create another field with just the incrementable digit in ID. Attach this to a routine which allows you to auto-increment it based on the last value entered, and then combine all the fields in a multiple index number which should not allow duplicates. I can supply you an...
I agree with the statement that the Forum is an excellent learning place, but still, in order to avoid asking too basic questions and speed up your learning curve, it's certainly worthwhile doing some reading first. Books (good books) have the advantage of allowing one to rapidly absorb a given...
I say thanks a lot to all of you. I think that Roy's Readline suggestion will best work for my objective in easily putting the values from the text file into variables. Writing is not a problem anymore, thanks to BrettStah's suggestion (using FileSystemObject). All this info I needed was in...
Hi Bob, thanks for your reply
I did think about splitting, but with a large amount of values on multiple lines, would it still be the best way? And I'm also talking about regularly changing values here. Anyway I would need the "read" code also (the code to read from a file with values delimited...
Hi BrettStah,
Well I just put 1 line and 2 values, just for ease of reading, in reality they will vary. But I think that once I get the workings, I can apply to any number of lines and values, don't u think? Or are there other issues when going beyond
1line/2values?
Thanks
So now I know how to write to a file in the format I need. Passing the values as variabes i quite easy too:
Dim v1 As String
Dim v2 As String
v1 = "1001;"
v2 = "2002;"
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("C:\My Documents\TestFile.txt", True)
a.WriteLine...
Thank u BrettStah. Wasn't even necessary to google around, I just looked up FileSystemObject in VBA help, and there it is, seemingly offering all the info I need in order to get along with my project.
Thanks again
I'd recommend: Alison Balter's Mastering Microsoft® Office Access 2003.
Not too basic and not too difficult either, with lots of handy examples.
regards
Hi folks,
I need to generate a write instruction that
writes strings to a file without appending string quotes to it and also allows me to put ; as a delimiter instead of just a comma. For example:
Dim hFile As Long
Dim v1 as string
Dim v2 as string
hFile = FreeFile
v1 = "text1"
v2 =...
Hi Doj, try this Add-query:
INSERT INTO Booking ( Booking_No, Crown_Court_No, Case_No, Startdate, Enddate )
SELECT "B001" AS Expr1, "C001" AS Expr2, "0001" AS Expr3, "27:Apr:07" AS Expr4, "31:May:07" AS Expr5;
Regards,
Jaime
Mea Culpa
Ok guys/Rich, Mea Culpa.
I overlooked the fact that I first needed to put the Tag property to "Required" for all the controls with required fields.
Sorry, and thanks again...
Regards,
Jaime
Alas... it did not work!
Hi Rich I did as u suggested but to no avail: the Jet error msg ("Field MyField can not be null, since it's required property is set to true" -please note that I translated this msg from portuguese, since my Access 2003 is a brazilian version) keeps coming up, and your...
Hi guys, I was looking for a way to trap err.number 3314 (when required field is null) before Jet generates its warning. I came across an old post from Rich (below), but I couldn't make it work as yet. In the calling form, under the Form_Error event I wrote the following:
Dim f As Form
Set f =...