User Profile
Collapse
-
I have actually solved the problem. Turns out I don't even need a nested for loop. It was much simpler than I thought. -
Thanks for the reply.
theta1 is just a variable corresponding to an angle initialized as(double theta1=0.0). It has an equation assigned to it within the While loop at the bottom of the code. The while loop itself is within another for loop.Leave a comment:
-
writing into a text file using a nested for loop
Hi guys,
My program involves trajectory planning using cubic spline method for a robotic arm. In the process, I had to calculate joint angles for each point in the path. In the last few lines of the code I need to write the values for counter and theta1 into a text file which I called "Test.txt". I am doing this using a nested for loop(the counter runs until it reaches 19 and hence need 19 theta1 values corresponding to it).... -
sorry, that's the best I could do in terms of explaining the issue at hand. I don't know what else I could add to make things clearer, but it's ok I am thinking of using a different approach to avoid using a 2nd Combobox. This will fix the problem.
Thank you.Leave a comment:
-
ok well, what my code does do is show the names of the Neighbourhood folders contained on my X drive. what it does not do is that it doesn't show the contents of the neighbourhood folder(which are the invoices) inside the Invoice combo box. I can show snippets of my code if that helps in any way.Leave a comment:
-
Hi, my code is supposed to open up an excel file for transfer into my Access database. The excel files are contained in a folder named Invoice.Dependi ng on the date of the files they are contained in different invoice folders(#1,#2,# 3 and so on.) The invoice folder is a subfolder to another folder named Neighbourhood and there are many of these Neighbourhood folders, so on my database form I made combo boxes for both Neighbourhood and Invoice. By...Leave a comment:
-
Rabbit, I am trying to do something like windows explorer in the database which opens up subfolders within folders and then finally selecting a file based on a criteria(like matching a certain date on the file name).Leave a comment:
-
yes Neopa thats right, I am not using any tables or queries for the combo boxes, just folders/subfolders kind of like windows explorer where you select a folder and it narrows down to a bunch of subfolders. I want to facilitate that in my database form.Leave a comment:
-
Maybe I didn't phrase my question properly. I need to show the contents of a folder inside a combo box based on the selection made in another combo box. So let's say I choose a neighbourhood from a combo box captioned neighbourhood. Let's take the neighbourhood name as Laurier Heights for example, I want to be able to see the contents of the Laurier Heights folder in another combo box next to the neighbourhood one. It was not clear on how your example...Leave a comment:
-
Hi I read that article but I'm not sure if I could understand how to relate that with filtering folder/file names on a Drive and using them in a combo box. Can you tell me how thats done?
Thanks.Leave a comment:
-
Combo Boxes - Cascading Folders
Hi I have two Combo boxes on a form:
1- Neighbourhood
2- Invoice
in the neighbourhood combo box I read in folder names on a particular drive(so whatever is the folder names are say on X:\Construction appear in the combo box).
what I want to be able to do is by selecting one of the neighbourhoods in the first combo box have the 2nd one show only whats inside the selected neighbourhood(s o to essentially... -
Hi thanks for the response.
The thing with my file names is that they are long and I only need to read the date from the names. So I have something like this: ALBERTA Daily Report-JULY 08 AE.xls or ALBERTA Daily Report 2008-07-10.xls and I only need to read the July date and compare that to a column named Date in my Access table. As the name implies these reports come daily so I need to compare all of them within each neighbourhood folder...Leave a comment:
-
How to read Excel file names from Access?
I was wondering how I could read excel file names in a particular folder using Access VBA. I need to compare the file names in that folder with what I have in a field of Access table. -
Yeah sure. I am also thinking of displaying all contents under the "Date" column in one single messagebox so thats what I am working on now. I can display each in a different messagebox but I want to combine them all in one. If you have an idea on that please let me know.
Here is the revised code which comes after exiting the For loop in my initial post:
...Code:iFldLeave a comment:
-
Thanks very much for the help. I figured out what was wrong with my code. It turns out I didnt need to use two recordsets, all I did was to use some If() then statements inside the first loop and it worked.Leave a comment:
-
Yes thats right, thats the row where the data values start, row 8. But nevertheless, the TransferSpreads heet method looks also at the titles for each column and since the columns run over two rows(6 and 7) it generates an error. When using loops, I ignored reading the column titles and just read in the data from row 8 onward to get around that error. Thats why I decided to use For loops rather than the TransferSpreads heet method.Leave a comment:
-
Thanks, but unfortunately the TransferSpreads heet() method fails for my Excel file just because of the way the Headings in blue text are. They are spread over two lines(rows 6 and 7) and the TransferSpreads heet method doesn't like that and I am not allowed to change the spreadsheet. So I have to just stick to using loops to put in the data. With the loops Can I merge the two recordsets?Leave a comment:
-
ok I will try but I dont know how long it will take them to respond. But for now, Can you please put the information into another file like maybe a text file or Excel file. I think If you have set up a table in that Access file you can copy it into Excel and attach it here. Thank you.Leave a comment:
-
oh I can't open the file Test.zip. It says "the file is located outside your intranet or on an untrusted site"Leave a comment:
-
I tried that format but it didn't work. If you look in For Me.xls you can see that from the last 4 columns in there only the first Row of data(23.0, NO, qwe, asdasd) is found in the Access Table(book1.xls ) so for some reason the records dont get incremented in the table and the other 3 rows are lost. Also, how about merging the two recordsets rst and rs2? Will I be able to do that?
I will put in the rest of the code here just in case.
...Leave a comment:
No activity results to display
Show More
Leave a comment: