Go Back   Access World Forums > Search Forums

 
Showing results 1 to 25 of 487
Search took 0.05 seconds.
Search: Posts Made By: MajP
Forum: Modules & VBA 09-11-2019, 04:59 AM
Replies: 7
Views: 208
Posted By MajP
Re: How to find all combinations within a constraint

This is known as a knapsack problem in combinatorial mathematics. It can be very difficult to solve if you have many different sizes. The problem is NP-complete. If all your sizes are 20 then we...
Forum: Modules & VBA 09-10-2019, 06:51 AM
Replies: 17
Views: 325
Posted By MajP
Re: Select as you type ListBox

I am having difficulty with posting, but I have an update and will post later.
1)It handles a backspace while typing in the list, spaces, single quotes.
2)If you type too far "Burgern" and only...
Forum: Queries 09-07-2019, 06:44 AM
Replies: 7
Views: 152
Posted By MajP
Re: Find and extract text if it occurs in first 4 characters

Just go into vba. Add a standard module, and paste. To get to vba the tab is "Database Tools" not "Developer" as it is in Excel.

https://www.youtube.com/watch?v=IIuKCxPlaTY
Forum: Queries 09-07-2019, 05:34 AM
Replies: 7
Views: 152
Posted By MajP
Re: Find and extract text if it occurs in first 4 characters

If it is not always 01 and not always 4 characters you can build something more generic.


Public Function GetString(ByVal SearchFor As String, ByVal SearchIn As String, Optional LengthToSearch As...
Forum: General 09-07-2019, 04:46 AM
Replies: 12
Views: 223
Posted By MajP
Re: How to make a row selectable in a table

As stated the hover requires a lot of code, but the click is very simple to highlight a row. If the click suffices then.
code in subform

Private Sub Form_Current()
Me.Tag = Nz(Me.carID)
...
Forum: Modules & VBA 09-05-2019, 11:34 AM
Replies: 12
Views: 197
Posted By MajP
Re: Prevent combobox autoselect first item

The OP may simply get the desired results by setting autoexpand to false. However, this still will not allow the use of arrow keys to move up and down the list. Will have to do something more...
Forum: Modules & VBA 09-05-2019, 10:21 AM
Replies: 12
Views: 197
Posted By MajP
Re: Prevent combobox autoselect first item

If I understand correctly, I believe so. If you look at the class see the property mAutoCompleteEnabled. This was put in to avoid this issue. I set this to true and false to allow you to expand...
Forum: Queries 09-05-2019, 06:53 AM
Replies: 19
Views: 456
Posted By MajP
Re: Hide data in combo box that has been previously selected

The easiest would be to make a query and save it, which is the same as the rowsource of the combobox. Then on the current event do a dcount on that query. If not the timing to get the comb...
Forum: General 09-05-2019, 05:54 AM
Replies: 107
Views: 35,848
Posted By MajP
Re: Yearly Attendance Tracker/Calendar

AbsenceCode =("PTO","FMLA", "VAC")
not correct sql. Try
AbsenceCode IN ('PTO','FMLA', 'VAC')
Forum: General 08-28-2019, 03:16 PM
Replies: 12
Views: 182
Posted By MajP
Re: Lookup Help

In the after update of the combo manufacturer reset the combo product
me.comboProduct = ""
Forum: Modules & VBA 08-27-2019, 04:52 PM
Replies: 4
Views: 128
Posted By MajP
Re: Word Automation Late Binding

For any constant go to the immediate window
?wdCell
12
Forum: Modules & VBA 08-22-2019, 04:00 AM
Replies: 11
Views: 222
Posted By MajP
Re: Making code more efficient

If you are using latebinding (no reference to the ppt library) then those power point constants will not be useable. Also make sure you set option explicit at the top of your code to ensure are...
Forum: Theory and practice of database design 08-21-2019, 06:51 PM
Replies: 16
Views: 264
Posted By MajP
Re: has anyone built their own font?

I would take a look at the Treeview control done in Winforms
https://www.jkp-ads.com/Download.asp
They make all the code available, and it open my eyes to some serious possibilities using this...
Forum: General 08-21-2019, 05:48 PM
Replies: 20
Views: 312
Posted By MajP
Re: How to enable a button if any of controls changed

No. "OldValue" is a property of a class and therefore not exposed except through the class.
Forum: Modules & VBA 08-21-2019, 02:51 PM
Replies: 8
Views: 108
Posted By MajP
Re: user-defined type not defined

Should look like this

Public Enum CustomerOrderStatusEnum
New_CustomerOrder = 0
Invoiced_CustomerOrder = 1
Shipped_CustomerOrder = 2
Closed_CustomerOrder = 3
End Enum
Forum: Modules & VBA 08-21-2019, 08:50 AM
Replies: 11
Views: 222
Posted By MajP
Re: Making code more efficient

I would first create a Power Point app, then a power point presentation, then a loop to create your slides passing in the presentation. You are recreating the presentation and app each time

This...
Forum: Queries 08-20-2019, 02:01 AM
Replies: 19
Views: 456
Posted By MajP
Re: Hide data in combo box that has been previously selected

Take a look. This took some trickery and an update of your tables but does what was asked.
Forum: Modules & VBA 08-19-2019, 03:59 PM
Replies: 3
Views: 92
Posted By MajP
Re: Insert Query

You can try (my table is called objectType)
TRANSFORM First(ObjectType.[Amount]) AS FirstOfAmount
SELECT ObjectType.[datetime], ObjectType.[EMPID]
FROM ObjectType
GROUP BY ObjectType.[datetime],...
Forum: Modules & VBA 08-19-2019, 10:03 AM
Replies: 4
Views: 103
Posted By MajP
Re: Combo box to filter form

If [Screen].[activeForm].[Name]=[Form].[Name] Then
Requery
Control Name =[Screen].[ActiveControl].[Name]
end if]

I do not understand what your code is supposed to do, that does not move to a...
Forum: General 08-17-2019, 05:21 AM
Replies: 20
Views: 312
Posted By MajP
Re: How to enable a button if any of controls changed

Arnelgp's code may be good enough. I avoid the case where you have "cat" in the textbox they start typing "dog", but change it back to "cat". Thus the reason to save the oldvalue to make sure the...
Forum: Modules & VBA 08-17-2019, 05:11 AM
Replies: 22
Views: 291
Posted By MajP
Forum: General 08-17-2019, 04:42 AM
Replies: 20
Views: 312
Posted By MajP
Re: How to enable a button if any of controls changed

Does not work on unbound forms AFAIK
https://docs.microsoft.com/en-us/office/vba/api/access.form.dirty(even)



Also unbound controls do not have an "oldvalue" property to compare. Have to roll...
Forum: Forms 08-14-2019, 02:57 AM
Replies: 1
Views: 58
Posted By MajP
Re: When is a Bookmark created ?

varBookMark = Me.Bookmark
Me.Requery
as soon as you requery you get a new set of bookmarks. Code fails here.

https://docs.microsoft.com/en-us/office/vba/api/access.form.bookmark
Forum: Modules & VBA 08-13-2019, 07:00 AM
Replies: 28
Views: 659
Posted By MajP
Re: Help with template

I do not know if you are saving anything by putting this in a table. Probably the easiest thing to do is is in the query just make all of the possible concatenations for N1, N2, NR1. Lets say you...
Forum: Modules & VBA 08-06-2019, 12:18 PM
Replies: 15
Views: 222
Posted By MajP
Re: Help with VBA!

In your code
myArray(i, 2) = myArray(i, 2) & vbNewLine _
& rsFiltered!Part1

would be modified to
myArray(i, 2) = myArray(i, 2) & vbNewLine _
&...
Showing results 1 to 25 of 487

 
Forum Jump



All times are GMT -8. The time now is 03:09 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World