Search results

  1. D

    Use different column based on user input to update data

    You can also do that with the actual field name I believe as the field name should be a constant value such as: Customer_Id = rst.Fields("RecordFieldName") and this is a whole lot less cryptic than the field index value of 3 Oh and just curious -- as I see this a lot -- why "ID"? I ask...
  2. D

    Prevent Cut functionality within Unbound Combobox

    *Sigh* got to love Microsoft for the technical obscurity ... Not Okay so vbNull = 1 not Null got it but that should still negate the Cut request since vbNull <> vbKeyX and I have also tried setting Shift = 0 in conjunction but that had no affect either. So far the only thing that seems to work...
  3. D

    Check if all required fields have been filled

    May I suggest that you use Unbound fields and then dynamically assign the Field.RowSource the query you want to use. I have never experienced issues with unbound fields while I must say I have and I have heard others almost always struggling with bound fields. This has 2 benefits 1) you avoid...
  4. D

    Prevent Cut functionality within Unbound Combobox

    Okay yes I did something similar to this but that did not stop the Cut from taking place. The only thing I have done so for that causes the Cut to not happen is put a MsgBox call in denoting what is happening What I did within the KeyDown event is: Dim mPrevKeyCode As Integer (m indicates...
  5. D

    MsCal AfterUpdate

    Why do you not share you code it is hard to debug something you cannot see
  6. D

    query left$

    If you are working with Access why not eliminate the filter and simply adjust your SQL Query as needed. Personally I rarely use any of the stuff that ties my code to tightly to Access in case I want to port that code to something else someday. Further this often has the benefit of not...
  7. D

    Use different column based on user input to update data

    Oh well you should post your answer so that it becomes an informative then :)
  8. D

    fill in Environ("USERNAME") when calendar controll clicked

    Which part does nothing, the first part, the second part, the whole ball of wax ? Can you pseudo code what you are doing and denote what is not working that would go a long way in allowing anyone to help you.
  9. D

    Multiple Barcodes in one textfield or combo box

    If I recall -- Barcodes have this built into them within their number -- or most do which is to say if you take the entire barcode you get a specific product but if you take a part of it you can get a family of products. But this really depends on the barcode schema you are working with.
  10. D

    Prevent Cut functionality within Unbound Combobox

    Okay I am not understanding the why of your question -- are you saying put some dummy process into the code in order to try and get the Cut not too function -- or -- are you saying that I should check this variable for some reason? But to answer your question yes I could do this but I am not...
  11. D

    Strip Punctuation Marks

    Why did you not just use the MS Access VBA String Function Replace ?? Replace ( string1, find, replacement ) string1 : The string to replace a sequence of characters with another set of characters. find : The string that will be searched for in string1. replacement : The string to...
  12. D

    query left$

    Okay to get just the area code (I am using an Integer just in case if you do not want an Integer then drop the CInt and change AreaCode to String) from your character phone number string Dim AreaCode As Integer AreaCode = CInt(Mid(PhoneNumber, 2, 3)) Okay the rest of that appears to be...
  13. D

    Textbox value to loop through table and find match

    DLookup("[UserLogin]", "tblAccessUsers", "UserLogin = " + lblUserName.Caption) Note you should not have spaces in your field names so I removed it in the above rendition of how to implement your request. Second you should not use a Textbox to show the person logged in as a Label works just as...
  14. D

    query left$

    Private Sub Form_Current() Dim Sname As String Dim Result As String Sname = Me.ch_ph Me.newAreaCode = Left$(Sname, 5) End Sub Okay the original question if I am right is how do you make a query using the Area Code you just acquired in order to get the state associated with...
  15. D

    Loop through a query to show results on form

    Dim dbsSR As DAO.Database Dim rstValQry As DAO.Recordset Set dbsSR = CurrentDb Set rstValQry = dbsSR.OpenRecordset("qry_val_tbl_ind_rec-rev_import") With rstValQry While (Not .EOF) strCieVal = Me![ValComp] & ";" strAcctVal = Me![ValAcct] & ";" If strPCAct = -1...
  16. D

    Prevent Cut functionality within Unbound Combobox

    Great and if that were the case for this situation I would do just that :) however that is not the case for this situation. Note: I am a senior software engineer and I have doing this kind of stuff for over 25+ years I know what this UI needs to do and does not need to do. I am just striving...
  17. D

    MsCal AfterUpdate

    I cannot give u the exact syntax but the general syntax would be: AfterUpdate Dim xToday As Datetime xToday = Now() If Date(xToday) = Date(Me!acxCal.Value) Then Me.btnToday.Enabled = False Else Me.btnToday.Enabled = True End If Hope that helps Note...
  18. D

    Check if all required fields have been filled

    Can I assume you are using database binding to your fields ?
  19. D

    Prevent Cut functionality within Unbound Combobox

    By foolish behavior I mean: Anything and everything that a user could do that is not what the software was meant to be used for. Basically this sequenced into the concept of trying to make the software foolproof (yeah I know if I build foolproof software they will just build a better fool)...
  20. D

    If Then Statement

    Try this instead -- I think this does what you were striving to do. Note I put the Me.QMarried on the outside because I am assuming that if Me.QMarried <> -1 you wanted to do nothing -- if not then you can just remove the inner If and put the whole thing on one line. If Me.QMarried = -1 Then...
Back
Top Bottom