User Profile

Collapse

Profile Sidebar

Collapse
ravnwing
ravnwing
Last Activity: Jun 11 '14, 07:12 PM
Joined: May 12 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ravnwing
    replied to Referencing fields in a Form
    That was exactly what I needed. Thank you so much.
    See more | Go to post

    Leave a comment:


  • ravnwing
    replied to Referencing fields in a Form
    okay. let me start again.
    I have an access database that, with the help of people here, I wrote a program for that takes in information from a text file, and extrapolates other pieces of information. It has 30 fields in total, including the id number which is just a primary key. Most of the time, I can continue to import from text files to add records, but sometimes I have to input data by hand from physical documents, and these physical...
    See more | Go to post

    Leave a comment:


  • ravnwing
    replied to Referencing fields in a Form
    I haven't really tried much. at the moment, I'm not trying to do anything complicated, I know the logic once I can add or edit data, but I dont know how to do that so I cant go very far. Right now I just went with a test line of code to see if it worked, based on something read somewhere else.
    Code:
    Form(recordForms).field3.text = 25
    It didnt work. recordForms is the name of teh record, and field3 is the name of the text box, which normally...
    See more | Go to post

    Leave a comment:


  • ravnwing
    started a topic Referencing fields in a Form

    Referencing fields in a Form

    Hello.

    I have a database in Microsoft Access which I need to update with new fields occasionally, and some of the fields are based on others. What I want to do is fill in the fields that I am given, and then use a "Complete Record" button to fill in the absent information. My question is how does one use VBA to access the fields that are written into text boxes on my Add Entry Form?
    See more | Go to post

  • Hello again. I've tried this in a bunch of different variations, but I don't seem to understand how the findfirst function is supposed to work. It doesn't like having the test variable inputted as a parameter. This is how I have it arranged now

    Code:
    Option Compare Database
    
    Private Sub finder()
    
    Dim db As DAO.Database
    Dim rst As DAO.Recordset
     
    Dim test As String
    Dim found As Boolean
    ...
    See more | Go to post

    Leave a comment:


  • Thank you for all the help. I didnt get a chance to implement that when I was working on my project today, I will be getting back to it monday. I will check in on how it is working then.
    Thank you again for all your help.
    See more | Go to post

    Leave a comment:


  • The theory sounds great, but when I tried to use it, the code executed but it didnt seem to run the way I thought it should, which probably just means I understand it only out of context. I used the code as follows, but it only spat back to me the first ID number in the table.
    any idea what I am doing wrong?

    Code:
    Private Sub finder()
    
    Dim db As DAO.Database
    Dim rst As DAO.Recordset
     
    Dim test As String
    ...
    See more | Go to post

    Leave a comment:


  • Seth's method works fabulously for adding the data into the table. This is all working wonderfully. the only important thing that I have left to ask is this. a second part of this list is adding in more data to records that have already been created. I have figured out how to navigate from record to record fairly well, and set up a loop to get me to record that I want.
    Code:
    Private Sub finder()
    
    Dim db As DAO.Database
    Dim
    ...
    See more | Go to post
    Last edited by ravnwing; May 15 '14, 06:43 PM. Reason: incomplete

    Leave a comment:


  • Okay, this is wonderful. I have written the code to pull the relevant data from the different lines of the text, and so far it is working flawlessly.

    Code:
    Private Sub text_reader()
        Dim intPointer As Integer
        Dim strLineIn As String
        Dim impText As String
        Dim testText As String
        Dim impNum As Long
        Dim impCash As Currency
        
    '
    'Find the first free pointer
    ...
    See more | Go to post

    Leave a comment:


  • oh! it works now! I see what you changed, why did that make it work now when it didn't before? Was the program overwriting the text file before it began?
    See more | Go to post

    Leave a comment:


  • okay, there are no longer any errors, which is good, but its not appearing to do anything. If I were running a program in C++, which is what I am most used to, I would say that I forgot to include the cout statements, and that it simply wasn't printing the results. Am I right? or is there something wrong with the code itself?
    See more | Go to post

    Leave a comment:


  • The compiler isnt accepting eof as an argument for the do while not statement in line 13. But even when I remove that part of the code, lines 13 and 16, its still giving me an error 54 on line 14.
    "Statements used in manipulating file contents must be appropriate to the mode in which the file was opened."
    then it goes on to list a number of reasons that typically cause that error code. Any idea why this is not working?
    ...
    See more | Go to post
    Last edited by ravnwing; May 14 '14, 01:22 PM. Reason: incomplete

    Leave a comment:


  • and yes, I know that I didnt go on to parse the line, but I thought I would test that it could read the file first.
    See more | Go to post

    Leave a comment:


  • I'm not sure what isnt working, but it certainly doesnt like something. When I run it this way, it doesnt like the double "line input" that was recommended. The debugger tells me that it was expecting a #, so I guess it thought that the second line input was supposed to be the intpointer, but then when I take it away it gives me runtime error 54, the help of which is perfectly unhelpful.

    I dont know if it matters, but as I...
    See more | Go to post

    Leave a comment:


  • The problem is that I have no idea what I'm doing. I have spent, literally, the last 6 hours, and at least that much time yesterday trying to teach myself how to do what I need to do and I'm still totally lost.

    The I/O information is not really built well to be a beginners understanding of VBA, I think its more meant to teach people who already know how to use VBA well how to do something new. The FreeFile information has no context...
    See more | Go to post

    Leave a comment:


  • The pattern is the whole thing, not just the repeated lines. And unfortunately it is not always an 8 line pattern, occasionally there is no line 4. But the relevant data that starts in line 5 always has "z24xy", so once I hit line line 4 I can check if the line begins with z24xy, and if it does not then just move to the next line and begin collecting the data from there. Lines 3, and in this case 4, have no relevant information.
    See more | Go to post
    Last edited by zmbd; May 13 '14, 06:10 PM. Reason: [z{check your Bytes.com inbox (^_^) }]

    Leave a comment:


  • I'm sorry, I didnt know how to do the advanced options. This is the first time I am using this site, as well as just beginning to teach myself access and vba.

    Most lines in this has some relevant information. The first line, for instance, I need characters 7-14. On the second I need 4-13. I think what Seth had to say in terms of using the left, right, and mid functions was a good one to pick out the relevant data. My question then becomes...
    See more | Go to post

    Leave a comment:


  • okay, so this is an image of the block of text with the fields I want to save for the access table highlighted. You are right about the spaces for the most part, but the second line is where that doesn't really work. Any ideas?

    ...
    See more | Go to post
    Last edited by zmbd; May 12 '14, 04:40 PM. Reason: [z[third party sites are generally blocked for our experts, Please use the [advanced] posting option}]

    Leave a comment:


  • Extracting Relevant Data from a Block of Text Containing some Junk

    Hello.
    For my job I get in txt files that look fairly well like gibberish if you don't know what you are looking for (and honestly a bit like gibberish even if you do.) My problem is that in the text files there are long repetitions of junk with relevant data in them. For example:

    Code:
    z260006U62425L                            U62425L                               
    z22000000000060000N# 000000000137000000000000137000000000006PzS000006000
    ...
    See more | Go to post
    Last edited by zmbd; May 12 '14, 06:26 PM. Reason: [Rabbit{Please use [code] and [/code] tags when posting code or formatted data.}][z{Oh, there's a format to that datadump?!(^_^) LOL}]
No activity results to display
Show More
Working...