Thanks Golom that was it. By combining an order by clause and a Top 1 parameter to the select it returns the first.....
A mention to you as well in the code for the research center.
I tried Golom code however it retrieved the first empty shot in a record not the first empty slot that is the beginning of a minimum of 4 empty slots.
My data is as follows (sample):
BoxRecNum BoxNum BoxDesc Tower Slot1 Slot 2 Slot3 Slot4 Slot5 Slot6 Slot7 Slot9.........
1 1...
...Dim rst As DAO.Recordset
Dim strCriteria As String
Dim strStartFld As String
Dim FldName As String
Dim Quo As String * 1
Quo = Chr(34)
Dim Idx As Integer
Dim Jdx As Integer
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset(rsIn, dbOpenDynaset)
'Check...
Thanks Golom. Worked perfectly. I had tried some syntax using various qoute combos (even researching some) and get confused on doubles for strings, # for dates, and nothing for Integers. So I was using nothing for the integer assumeing it was resolving the variable to type. I've learned...
MichaelRed,
One more thing before my technical questions start (it may be a day or two before you get them as I am traveling on business tomorrow). May I have your permission (I will credit via embedded comment) to use the code. The code is being used to build out a gene/tissue sample tracking...
Thanks to both of you. However, as MichaelRed points out, I inherited the table structure. I will take your comments on the table seriously. I may ask a question or to while I work through the code for understanding. Also, in the past I have used ordinal postitions in the table structure to run...
Hi,
I have a table say tblBoxSlot
With the fields:box, tower, and slot1, slot2, ......slot81
Empty slots have a value of -1111 Filled slots have a value of
an integer greater than zero.
How can I find say the first 6 consecutive slots in a box record that are empty (-1111)?
I am having...
Hi,
I have created a form in which I assign a image to a unbound image field based upon the following code that has a field on the form that contains the path to the image. In the past I have used this on a single form and in the on current event. However, I need this in a subform that is...
Hi,
I have created a form in which I assign a image to a unbound image field based upon the following code that has a field on the form that contains the path to the image. In the past I have used this on a single form and in the on current event. However, I need this in a subform that is...
Read the MSAccess Help:
Change the color of the control that has focus on a form
Open the form in Design view or Form view.
Make sure that the control is selected, and then, on the Format menu, click Conditional Formatting.
In the Condition x area of the Conditional Formatting dialog box...
It is my understanding that you can create parameterized recordsets for use say when called from a form reference in the criteria of the query. However, such record sets are not available for use through VBA code manipulation afterwards. At least I could not get it to work and I've seen other...
The code is doing exactly what you said. It just doesn't find EOF true, ever contrary to the Access Documentation in Help.
It finds the first then finds the next matching then the next and so on. When it gets to the last record that it finds it continues to return that by going through the...
I am trying to complete a Do Loop sequence that includes a recordset findnext command. Unfortunately, the Findnext always stays at the last found record (it successfully finds the previous records) instead of return a EOF is true which would end the loop. Any hints would be greatly appreciated...
I've tried the following stub code (you can see some commented out tries) but I cannot get to the first cell in the table and then move between cells.
Private Sub MergeButton_Click()
Dim Letterloc As String
Dim strInsured As String
strInsured = Me.txtInsuredName
Dim db As DAO.Database
Dim...
Hi,
Have used book marks in the past to do a mail merge for a single record into a word template. Works great. However, I am now faced with moving through a record set (using finds) and for a particular vendor listing once their name address, etc. Still works great with book marks...
Hi,
Have used book marks in the past to do a mail merge for a single record into a word temple. Works great. However, I am now faced with moving through a record set (using finds) and for a particular vendor listing once their name address, etc. Still works great with book marks. However...
I need to be able to duplicate a record on a form and create a new record. In addition, the same procedure needs to copy the existing subform records (a couple of different subforms are on the form) as well. The new subform records obviously need to point the new duplicated main form (think of...
Richard,
I am sure that mph1 is wise and you are too. I've got 10 years with with and at Oracle Corp. My needs are pretty specific for this application and the use of the autonumber field. This is not the usual way I would handle things but sometimes one has no choice in the matter. Thanks to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.