Search results

  1. C

    Solved Select column value in a listbox

    I have a listbox that is populated with a value list. The listbox has 4 columns. Each value in the listbox is its own unique value. Is it possible to click and return a value in a column or row. Example: 5 Tooth Wave 87 tree YY GRF 760 How would I click select a specific...
  2. C

    Solved Runtime 3155 with SQL database

    Great suggestion. I'll recode to the SelectMax(). The sql database that i'm linking to is part of another application that I can' change at this time. So I'm stuck with doing it this way. Thanks again.
  3. C

    Solved Runtime 3155 with SQL database

    Hi bastanu, Yes I can manually add a record. But here is what I found. What I thought was the primary key ('RID') in the referral table was in fact an indexed field but not an autonumber. So it was not generating a new record id at all. This created a violation. The fix, was to open the...
  4. C

    Solved Runtime 3155 with SQL database

    Thank you for all of your replies and questions. I only tried the ODBC direct because my regular link connections were failing and it was suggested somewhere on the internet. But in spite of it, it still failed. I could take it out and us the following line but it will still fail. set rsR =...
  5. C

    Solved Runtime 3155 with SQL database

    Sorry, Runtime 3155 - "ODBC - - Insert on linked table ???? failed " is what I'm getting
  6. C

    Solved Runtime 3155 with SQL database

    I have a front end Access 365 and backend sql server database. I get a runtime 3155 when trying to insert a record into the sql table. I haven't found any suitable solution yet. It errors out at rsR.Update. Any help is appreciated. Private Sub cmdAddSelect_Click() On Error GoTo...
  7. C

    Variable Fieldnames in DAO.Recordset

    Thanks for your feedback. This database has been around a long time and working as is and I was hoping not to mess it up at this time with restructuring. I'll inform the boss that this will be an issue at some time. What worked is simplified below. And all fields are recognized. dim strD as...
  8. C

    Variable Fieldnames in DAO.Recordset

    I'm hoping someone can help me solve this issue. I have a table with a lot of fields in the same row with similar names the differences are numbers. D1, D2, D3, ...... Chr1Amt, Chr1Code, Chr1Desc, Chr1Dx, . . . . Chr2Amt, Chr2Code, Chr2Desc, Chr2Dx, . . . . And so on. I have been able to run...
  9. C

    STILL CANT SUS THE COMBO TO LIST BOX

    Don't know if you solved this one yet but here is what I would do. One thing I have done is setup a separate tblPtMeds for patient meds. Patient meds change with time and you still need to keep track of what meds were taken and at what time. So a tblPtMeds can be used with fields, PtID...
  10. C

    Find rownumber in sql database

    Thanks for all of your suggestions. I'll look at the sql field to see if I can combine fields to make them unique.
  11. C

    Find rownumber in sql database

    Thank you for all for your input. If I populate a listbox thru a select query in its rowsource and then want to update a particular field in a record, how do make sure the correct row is updated in the original sql database? I'm not sure how the update will update the correct record if many...
  12. C

    Find rownumber in sql database

    I'm not familiar with the sql database structure. I've encountered a sql table that has no apparent unique ID that I can see. If I link to that sql database in an access app, how do I make sure I'm updating the correct row in the sql database. Something about getting the row_number()? sql...
  13. C

    Drag and Drop in Schedule Form

    Thanks for all of your suggestions. I'm going to test the ideas out. I've always lacked in using the mouse events, but I guess there is no better time than now. Wish me luck. Thanks again.:)
  14. C

    Drag and Drop in Schedule Form

    I have a form that I use for my schedule that has 4 columns and enough rows for 8am to 5 pm in 10min increments. Each time slot = 1 textbox on the form. And appointment might take up many timeslots. Each textbox has a invisible associated textbox that holds appt and control data to control...
  15. C

    Listbox won't populate with select query

    I think you found the problem. Spelling error. It should have been ChanNotes all along. I'll test it again and see what happens. But I think this is resolved by a silly reference error. Thanks again for all of your attention to detail.
  16. C

    Listbox won't populate with select query

    Guess what. this msql worked regardless of the variable. [Code] msql = "SELECT CHANNotes.nDate, CHANNotes.nNote, CHANNotes.nID, CHANNotes.nPID, CHANNotes.nType " & _ "From CHANNotes " & _ "WHERE (((CHANNotes.nPID)='" & strPID & "'));" /[Code] I'm open to explainations
  17. C

    Listbox won't populate with select query

    placing SELECT nDate, nNote, nID, nType, nPID FROM ChartNotes WHERE nPID = '30580' directly into the listbox rowsource property of the form produces 10 records.
  18. C

    Listbox won't populate with select query

    MsgBox Forms!SelectChartNote!lstNotes.Recordset.RecordCount returns runtime 91 Object variable or With block variable not set MsgBox Forms!SelectChartNote!lstNotes.Rowsource returns: SELECT nDate, nNote, nID, nType, nPID FROM ChartNotes WHERE nPID = '30580'
  19. C

    Listbox won't populate with select query

    Thanks for all of your quick replies. Listbox Row Source Type: Table/Query msql produced the correct variable: SELECT nDate, nNote, nID, nType, nPID FROM ChartNotes WHERE nPID = '080517' PID and strPID are strings Forms!SelectChartNote is not yet Modal or Popup. Using the msql in the actual...
  20. C

    Listbox won't populate with select query

    I have a cmdbutton on Form1 that calls a public function that opens a separate form2 and then populates Form2.listbox. It seems like I've done this before, but this time the code runs but the listbox populates with no data. [Code] Private Sub cmdChartNote_Click() DoCmd.OpenForm...
Back
Top Bottom