User Profile
Collapse
-
Thank you so much Luk3r, that did it, I have tried that command in all parts of that line in different ways, I guess I did not try THAT one, thanks again for your help. I'm sure I'll have other questions as I continue with the project, but this is great help, thanks again! -
-
Database record search Visual Basic 2010
I'm new to programming and got stuck with an issue and was wondering if you could lend a hand. I have an Access database I'm building a front end for in VB 2010, I was able to connect to the database to retrieve records. I built a search feature and was able to find records with it, but I have searched and searched the web and can't find the right way to accomplish my goal. On the search I need to only search records that are marked "Active"... -
Thanks again zmbd, will look into that in future projects...!...Leave a comment:
-
Ok, problem fixed, I was missing single quotes around "17LR" since the field is a text field, grrr, they always get me...
So the working macro code is:
Code:1.DLookUp("[OfficeLocation]","[tblEmployeeInfo]","[OfficeLocation] = Form.[OfficeLocation] And [OfficeLocation]<>'17LR'") Is Not Null
Leave a comment:
-
Hi zmbd,
Thanks for your response, this is a macro I'm working with... The original post had both the working code and the above which was a tweaked version of it. I would also rather leave the post unsplit so that you can get the background of the story thus making more sense...?
Thanks Again...Leave a comment:
-
Part2: Using DLookUp to prevent duplicates in Form
{{ Split from: Using DLookUp to prevent duplicates in Form }}
Hi all,
I was just tasked at tweaking the above macro and again I cannot find the right combination... I need to put an exception to a particular location. In other words the macro should alert to duplicate locations unless the location is equal to "17LR". The above works perfectly in another part of the database, here is what I...Last edited by zmbd; May 4 '15, 03:57 PM. Reason: [Alex{Misplaced Quote Tag}][z{split the post out - fixed the back link}] -
-
Ugh!!! Found it! Typo on line #31!
That's what happens when you are looking at the code day in and day out, starts looking the same...
Thanks for the help ZMBD! Will look into your suggestion as well, probably the better way of doing it...Leave a comment:
-
I have the same exact code working on another part of the database, the only difference is that the line 33 you had me comment out, is located below the "Loop" tag AND that code searches text only, this one is searching numbers, I have a third that searches numbers and text, but that one is not working as well......Leave a comment:
-
Thanks for your reply zmbd, I had tried removing line 33 prior to posting and nothing happens.
I know the code is executing because I placed a messagebox before line 33 and it does display it, I just think for some reason the FindFirst command is not being executed and/or is not finding the next record...
UPDATE: I have the same code on another part of the database that I think its still working, will check it out and...Leave a comment:
-
Cannot get Recordset.FindNext to work
Hello All,
I had this working and for some reason I broke it somewhere...
Basically I created a button to search for records based on the status of a checkbox and data in a textbox. The code searches for the first item found and prompts if the search needs to continue in order to find additional records.
This is the code:
Code:If IsNull(txtAssetTagSearch) = True Then MsgBox
-
I think I finally found the culprit...! Don't understand why it would affect it that way, but for some reason it was...
The unbound field called txtTotalHours was once bound to TotalHours, before I inserted your code, I unbound it and changed its "Other" name to txtTotalHours, I had some other code to change font color and field lock status... I had forgotten to change that code to reflect the new name...
Here...Leave a comment:
-
Ok, I'm using Single Form and this happens when I click the right arrow at the bottom of the record to go into a new record.
You are correct about the totals, I need a full total for the two weeks.
The code is the same as is on post #28, plus the changes you added on your post #29.
Let me know if you need additional info...Leave a comment:
-
Hi jforbes,
Thanks much..., It seems to be partially working, when I enter info for one record and move on to the next, it carries the info into the other record. For example, I entered the following times on PPW1Monday Column of the first record:
Regular Start:
Regular End:
Flex1 Start: 09:30 AM
Flex 1 End: 10:00 AM
Core Start: 10:00 AM
Core End: 3:00 PM
Flex 2 Start: 3:00 PM...Leave a comment:
-
Hi jforbes,
Hope all is well with ya... I was hoping you could help me to add a calculation to the code you helped me work on a few weeks ago...
Here is a what it looks like:
Code:Private Sub doPaint() Dim lTime As Long ' Calculate Time in Minutes - PPW1Monday lTime = 0 lTime = lTime + (Nz(DateDiff("n", Me![cboPPW1MondayRegularStart],
Leave a comment:
-
It's the same code you posted above, sorry about that... Although I have since figure out the issue and I got it working.
Thanks again for your usual help,
Alex...Leave a comment:
-
Hi Rabbit,
Sorry to bug ya with this again, but I've just been asked to add 7 more fields to this search string, AssetTag1, AssetTag2, AssetTag3, etc... But I cannot get it to work, I have tried placing double and single quotes as above around them, tried both the and/or, but no luck, I think I have the syntax wrong...
Please help, in advance thanks a mill,
Alex...Leave a comment:
-
Maybe..., this is the way I'm doing it. The table, actually using a query, "qryEmploye es" (linked to "tblEmployees") , is the rowsource used by the "FullName" combo to populate the list. The query contains about 30 columns, I use the Column Widths property to just display the employee full name. The, on the On Change event of the combo I have something like this:
Code:Me.PositionTitle = Me.FullName.Column(1)
Leave a comment:
-
The information that is changing is on another table that the combobox looks up. For example, I enter info on the form, data on the FullName field looks up data on a table and populates other fields based on the choice made on the combobox. Data is saved on the form. Then at some point the table that the combobox got its info from, is updated. When you load the form again, naturally, the items that were changed on the other table are not reflected...Leave a comment:
No activity results to display
Show More
Leave a comment: